mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Move MCSymbol Value in to the union of Offset and CommonSize.
This is a reapplication of r239440 which was reverted in r239441. There are no changes to this patch from then, but this had instead exposed a bug in .thumb_set which was fixed in r240318. Having fixed that bug, it is now safe to re-apply this code. Original commit message below: 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@240320 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