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:
Rafael Espindola
2015-06-17 20:08:20 +00:00
parent 1c63fe6c61
commit a1e31b45cc
7 changed files with 14 additions and 38 deletions

View File

@ -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;