Remove trivial forwarding function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238707 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola 2015-06-01 01:39:15 +00:00
parent 2dd8a67317
commit d1678240e5
3 changed files with 5 additions and 6 deletions

View File

@ -910,12 +910,11 @@ public:
return true; return true;
} }
bool hasSymbolData(const MCSymbol &Symbol) const { return Symbol.hasData(); }
void registerSymbol(const MCSymbol &Symbol, bool *Created = nullptr) { void registerSymbol(const MCSymbol &Symbol, bool *Created = nullptr) {
bool New = !Symbol.hasData();
if (Created) if (Created)
*Created = !hasSymbolData(Symbol); *Created = New;
if (!hasSymbolData(Symbol)) { if (New) {
Symbol.initializeData(); Symbol.initializeData();
Symbols.push_back(&Symbol); Symbols.push_back(&Symbol);
} }

View File

@ -58,7 +58,7 @@ bool MCObjectStreamer::emitAbsoluteSymbolDiff(const MCSymbol *Hi,
const MCSymbol *Lo, const MCSymbol *Lo,
unsigned Size) { unsigned Size) {
// Must have symbol data. // Must have symbol data.
if (!Assembler->hasSymbolData(*Hi) || !Assembler->hasSymbolData(*Lo)) if (!Hi->hasData() || !Lo->hasData())
return false; return false;
// Must both be assigned to the same (valid) fragment. // Must both be assigned to the same (valid) fragment.

View File

@ -706,7 +706,7 @@ void WinCOFFObjectWriter::RecordRelocation(
const MCSymbol &Symbol = Target.getSymA()->getSymbol(); const MCSymbol &Symbol = Target.getSymA()->getSymbol();
const MCSymbol &A = Symbol; const MCSymbol &A = Symbol;
if (!Asm.hasSymbolData(A)) if (!A.hasData())
Asm.getContext().reportFatalError(Fixup.getLoc(), Asm.getContext().reportFatalError(Fixup.getLoc(),
Twine("symbol '") + A.getName() + Twine("symbol '") + A.getName() +
"' can not be undefined"); "' can not be undefined");