mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-12-20 03:17:48 +00:00
Pack the MCSymbolELF bit fields into MCSymbol's Flags.
This reduces MCSymolfELF from 64 bytes to 56 bytes on x86_64. While at it, also make getOther/setOther easier to use by accepting unshifted STO_* values. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239006 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -17,15 +17,9 @@ class MCSymbolELF : public MCSymbol {
|
||||
/// symbol has no size this field will be NULL.
|
||||
const MCExpr *SymbolSize = nullptr;
|
||||
|
||||
mutable unsigned BindingSet : 1;
|
||||
mutable unsigned UsedInReloc : 1;
|
||||
mutable unsigned WeakrefUsedInReloc : 1;
|
||||
mutable unsigned IsSignature : 1;
|
||||
|
||||
public:
|
||||
MCSymbolELF(const StringMapEntry<bool> *Name, bool isTemporary)
|
||||
: MCSymbol(true, Name, isTemporary), BindingSet(false),
|
||||
UsedInReloc(false), WeakrefUsedInReloc(false), IsSignature(false) {}
|
||||
: MCSymbol(true, Name, isTemporary) {}
|
||||
void setSize(const MCExpr *SS) { SymbolSize = SS; }
|
||||
|
||||
const MCExpr *getSize() const { return SymbolSize; }
|
||||
@@ -42,7 +36,7 @@ public:
|
||||
void setBinding(unsigned Binding) const;
|
||||
unsigned getBinding() const;
|
||||
|
||||
bool isBindingSet() const { return BindingSet; }
|
||||
bool isBindingSet() const;
|
||||
|
||||
void setUsedInReloc() const;
|
||||
bool isUsedInReloc() const;
|
||||
@@ -54,6 +48,9 @@ public:
|
||||
bool isSignature() const;
|
||||
|
||||
static bool classof(const MCSymbol *S) { return S->isELF(); }
|
||||
|
||||
private:
|
||||
void setIsBindingSet() const;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user