summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-03-09 23:12:18 +0000
committerChris Lattner <sabre@nondot.org>2010-03-09 23:12:18 +0000
commitaab52840afba1ede5d8c28ec6ff26556b1763860 (patch)
tree021fc22619e598e02467c4ece6e09e2934204b5b
parentb495cad7caecebc5bfc18741098c1601532b7d27 (diff)
downloadbcm5719-llvm-aab52840afba1ede5d8c28ec6ff26556b1763860.tar.gz
bcm5719-llvm-aab52840afba1ede5d8c28ec6ff26556b1763860.zip
make the NullStreamer set the section on a label when emitted so that isDefined() works.
llvm-svn: 98100
-rw-r--r--llvm/lib/MC/MCNullStreamer.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/MC/MCNullStreamer.cpp b/llvm/lib/MC/MCNullStreamer.cpp
index ab6179907e8..5f0c64adffd 100644
--- a/llvm/lib/MC/MCNullStreamer.cpp
+++ b/llvm/lib/MC/MCNullStreamer.cpp
@@ -29,7 +29,11 @@ namespace {
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) {}
OpenPOWER on IntegriCloud