[llvm-commits] [llvm] r98100 - /llvm/trunk/lib/MC/MCNullStreamer.cpp
Chris Lattner
sabre at nondot.org
Tue Mar 9 15:12:18 PST 2010
Author: lattner
Date: Tue Mar 9 17:12:18 2010
New Revision: 98100
URL: http://llvm.org/viewvc/llvm-project?rev=98100&view=rev
Log:
make the NullStreamer set the section on a label when emitted so that isDefined() works.
Modified:
llvm/trunk/lib/MC/MCNullStreamer.cpp
Modified: llvm/trunk/lib/MC/MCNullStreamer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCNullStreamer.cpp?rev=98100&r1=98099&r2=98100&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCNullStreamer.cpp (original)
+++ llvm/trunk/lib/MC/MCNullStreamer.cpp Tue Mar 9 17:12:18 2010
@@ -29,7 +29,11 @@
CurSection = Section;
}
- virtual void EmitLabel(MCSymbol *Symbol) {}
+ virtual void EmitLabel(MCSymbol *Symbol) {
+ assert(Symbol->isUndefined() && "Cannot define a symbol twice!");
+ assert(CurSection && "Cannot emit before setting section!");
+ Symbol->setSection(*CurSection);
+ }
virtual void EmitAssemblerFlag(MCAssemblerFlag Flag) {}
More information about the llvm-commits
mailing list