[llvm] r211646 - Simplify EmitLabel.
Rafael Espindola
rafael.espindola at gmail.com
Tue Jun 24 16:54:40 PDT 2014
Author: rafael
Date: Tue Jun 24 18:54:40 2014
New Revision: 211646
URL: http://llvm.org/viewvc/llvm-project?rev=211646&view=rev
Log:
Simplify EmitLabel.
All the "real" streamers were already calling to MCStreamer::EmitLabel
to do part of the work.
Modified:
llvm/trunk/lib/LTO/LTOModule.cpp
llvm/trunk/lib/MC/MCNullStreamer.cpp
Modified: llvm/trunk/lib/LTO/LTOModule.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/LTO/LTOModule.cpp?rev=211646&r1=211645&r2=211646&view=diff
==============================================================================
--- llvm/trunk/lib/LTO/LTOModule.cpp (original)
+++ llvm/trunk/lib/LTO/LTOModule.cpp Tue Jun 24 18:54:40 2014
@@ -653,7 +653,7 @@ namespace {
AddValueSymbols(Inst.getOperand(i).getExpr());
}
void EmitLabel(MCSymbol *Symbol) override {
- Symbol->setSection(*getCurrentSection().first);
+ MCStreamer::EmitLabel(Symbol);
markDefined(*Symbol);
}
void EmitAssignment(MCSymbol *Symbol, const MCExpr *Value) override {
Modified: llvm/trunk/lib/MC/MCNullStreamer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCNullStreamer.cpp?rev=211646&r1=211645&r2=211646&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCNullStreamer.cpp (original)
+++ llvm/trunk/lib/MC/MCNullStreamer.cpp Tue Jun 24 18:54:40 2014
@@ -28,11 +28,6 @@ namespace {
const MCExpr *Subsection) override {
}
- void EmitLabel(MCSymbol *Symbol) override {
- assert(Symbol->isUndefined() && "Cannot define a symbol twice!");
- assert(getCurrentSection().first &&"Cannot emit before setting section!");
- AssignSection(Symbol, getCurrentSection().first);
- }
void EmitAssemblerFlag(MCAssemblerFlag Flag) override {}
void EmitThumbFunc(MCSymbol *Func) override {}
More information about the llvm-commits
mailing list