From: Rafael Espindola Date: Tue, 24 Jun 2014 23:54:40 +0000 (+0000) Subject: Simplify EmitLabel. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=a68a4f0fd59183c3e3cd23b0a068234b54ae0db9;p=oota-llvm.git Simplify EmitLabel. All the "real" streamers were already calling to MCStreamer::EmitLabel to do part of the work. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211646 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/LTO/LTOModule.cpp b/lib/LTO/LTOModule.cpp index 50ddaa12a4c..05c384d7116 100644 --- a/lib/LTO/LTOModule.cpp +++ b/lib/LTO/LTOModule.cpp @@ -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 { diff --git a/lib/MC/MCNullStreamer.cpp b/lib/MC/MCNullStreamer.cpp index 5fa14c97892..ca162a43497 100644 --- a/lib/MC/MCNullStreamer.cpp +++ b/lib/MC/MCNullStreamer.cpp @@ -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 {}