[llvm] r238707 - Remove trivial forwarding function.
Rafael Espindola
rafael.espindola at gmail.com
Sun May 31 18:39:15 PDT 2015
Author: rafael
Date: Sun May 31 20:39:15 2015
New Revision: 238707
URL: http://llvm.org/viewvc/llvm-project?rev=238707&view=rev
Log:
Remove trivial forwarding function.
Modified:
llvm/trunk/include/llvm/MC/MCAssembler.h
llvm/trunk/lib/MC/MCObjectStreamer.cpp
llvm/trunk/lib/MC/WinCOFFObjectWriter.cpp
Modified: llvm/trunk/include/llvm/MC/MCAssembler.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCAssembler.h?rev=238707&r1=238706&r2=238707&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MC/MCAssembler.h (original)
+++ llvm/trunk/include/llvm/MC/MCAssembler.h Sun May 31 20:39:15 2015
@@ -910,12 +910,11 @@ public:
return true;
}
- bool hasSymbolData(const MCSymbol &Symbol) const { return Symbol.hasData(); }
-
void registerSymbol(const MCSymbol &Symbol, bool *Created = nullptr) {
+ bool New = !Symbol.hasData();
if (Created)
- *Created = !hasSymbolData(Symbol);
- if (!hasSymbolData(Symbol)) {
+ *Created = New;
+ if (New) {
Symbol.initializeData();
Symbols.push_back(&Symbol);
}
Modified: llvm/trunk/lib/MC/MCObjectStreamer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCObjectStreamer.cpp?rev=238707&r1=238706&r2=238707&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCObjectStreamer.cpp (original)
+++ llvm/trunk/lib/MC/MCObjectStreamer.cpp Sun May 31 20:39:15 2015
@@ -58,7 +58,7 @@ bool MCObjectStreamer::emitAbsoluteSymbo
const MCSymbol *Lo,
unsigned Size) {
// Must have symbol data.
- if (!Assembler->hasSymbolData(*Hi) || !Assembler->hasSymbolData(*Lo))
+ if (!Hi->hasData() || !Lo->hasData())
return false;
// Must both be assigned to the same (valid) fragment.
Modified: llvm/trunk/lib/MC/WinCOFFObjectWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/WinCOFFObjectWriter.cpp?rev=238707&r1=238706&r2=238707&view=diff
==============================================================================
--- llvm/trunk/lib/MC/WinCOFFObjectWriter.cpp (original)
+++ llvm/trunk/lib/MC/WinCOFFObjectWriter.cpp Sun May 31 20:39:15 2015
@@ -706,7 +706,7 @@ void WinCOFFObjectWriter::RecordRelocati
const MCSymbol &Symbol = Target.getSymA()->getSymbol();
const MCSymbol &A = Symbol;
- if (!Asm.hasSymbolData(A))
+ if (!A.hasData())
Asm.getContext().reportFatalError(Fixup.getLoc(),
Twine("symbol '") + A.getName() +
"' can not be undefined");
More information about the llvm-commits
mailing list