mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-26 05:25:47 +00:00
Move MCSymbol Value in to the union of Offset and CommonSize.
It wasn't possible to have a variable Symbol with offset or 'isCommon' so this just enables better packing of the MCSymbol class. Reviewed by Rafael Espindola. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239440 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -40,7 +40,11 @@ void *MCSymbol::operator new(size_t s, const StringMapEntry<bool> *Name,
|
||||
void MCSymbol::setVariableValue(const MCExpr *Value) {
|
||||
assert(!IsUsed && "Cannot set a variable that has already been used.");
|
||||
assert(Value && "Invalid variable value!");
|
||||
assert((SymbolContents == SymContentsUnset ||
|
||||
SymbolContents == SymContentsVariable) &&
|
||||
"Cannot give common/offset symbol a variable value");
|
||||
this->Value = Value;
|
||||
SymbolContents = SymContentsVariable;
|
||||
SectionOrFragment = nullptr;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user