aboutsummaryrefslogtreecommitdiff
path: root/lib/MC/MCNullStreamer.cpp
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
commit2e5dd9b7415e9586ab1f436a336c6e014169e48a (patch)
treecabe9cf60dbc0e518a242f03d80e0bf8e0368af8 /lib/MC/MCNullStreamer.cpp
parentf7477470d37ee2ab9075eaee4745fa084d424ab8 (diff)
make the NullStreamer set the section on a label when emitted so that isDefined() works.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98100 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MCNullStreamer.cpp')
-rw-r--r--lib/MC/MCNullStreamer.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/MC/MCNullStreamer.cpp b/lib/MC/MCNullStreamer.cpp
index ab6179907e..5f0c64adff 100644
--- a/lib/MC/MCNullStreamer.cpp
+++ b/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) {}