mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 22:24:54 +00:00
Move IsUsedInReloc from MCSymbolELF to MCSymbol.
There is a free bit is MCSymbol and MachO needs the same information. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239933 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -345,16 +345,6 @@ bool MCAssembler::isThumbFunc(const MCSymbol *Symbol) const {
|
||||
return true;
|
||||
}
|
||||
|
||||
void MCAssembler::addLocalUsedInReloc(const MCSymbol &Sym) {
|
||||
assert(Sym.isTemporary());
|
||||
LocalsUsedInReloc.insert(&Sym);
|
||||
}
|
||||
|
||||
bool MCAssembler::isLocalUsedInReloc(const MCSymbol &Sym) const {
|
||||
assert(Sym.isTemporary());
|
||||
return LocalsUsedInReloc.count(&Sym);
|
||||
}
|
||||
|
||||
bool MCAssembler::isSymbolLinkerVisible(const MCSymbol &Symbol) const {
|
||||
// Non-temporary labels should always be visible to the linker.
|
||||
if (!Symbol.isTemporary())
|
||||
@@ -364,7 +354,7 @@ bool MCAssembler::isSymbolLinkerVisible(const MCSymbol &Symbol) const {
|
||||
if (!Symbol.isInSection())
|
||||
return false;
|
||||
|
||||
if (isLocalUsedInReloc(Symbol))
|
||||
if (Symbol.isUsedInReloc())
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
@@ -36,10 +36,7 @@ enum {
|
||||
ELF_WeakrefUsedInReloc_Shift = 11,
|
||||
|
||||
// One bit.
|
||||
ELF_UsedInReloc_Shift = 12,
|
||||
|
||||
// One bit.
|
||||
ELF_BindingSet_Shift = 13
|
||||
ELF_BindingSet_Shift = 12
|
||||
};
|
||||
}
|
||||
|
||||
@@ -175,15 +172,6 @@ unsigned MCSymbolELF::getOther() const {
|
||||
return Other << 5;
|
||||
}
|
||||
|
||||
void MCSymbolELF::setUsedInReloc() const {
|
||||
uint32_t OtherFlags = getFlags() & ~(0x1 << ELF_UsedInReloc_Shift);
|
||||
setFlags(OtherFlags | (1 << ELF_UsedInReloc_Shift));
|
||||
}
|
||||
|
||||
bool MCSymbolELF::isUsedInReloc() const {
|
||||
return getFlags() & (0x1 << ELF_UsedInReloc_Shift);
|
||||
}
|
||||
|
||||
void MCSymbolELF::setIsWeakrefUsedInReloc() const {
|
||||
uint32_t OtherFlags = getFlags() & ~(0x1 << ELF_WeakrefUsedInReloc_Shift);
|
||||
setFlags(OtherFlags | (1 << ELF_WeakrefUsedInReloc_Shift));
|
||||
|
Reference in New Issue
Block a user