diff options
| author | Chris Lattner <sabre@nondot.org> | 2010-03-09 23:12:18 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2010-03-09 23:12:18 +0000 |
| commit | f58c360c9668713b4b14a62a86d28337b33d3b9a (patch) | |
| tree | cabe9cf60dbc0e518a242f03d80e0bf8e0368af8 /lib/MC/MCNullStreamer.cpp | |
| parent | 2d11fe63b130745bf3c91cd55b643f4a3719016f (diff) | |
| download | external_llvm-f58c360c9668713b4b14a62a86d28337b33d3b9a.zip external_llvm-f58c360c9668713b4b14a62a86d28337b33d3b9a.tar.gz external_llvm-f58c360c9668713b4b14a62a86d28337b33d3b9a.tar.bz2 | |
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.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/MC/MCNullStreamer.cpp b/lib/MC/MCNullStreamer.cpp index ab61799..5f0c64a 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) {} |
