diff options
| author | Pedro Artigas <partigas@apple.com> | 2012-12-12 22:59:46 +0000 |
|---|---|---|
| committer | Pedro Artigas <partigas@apple.com> | 2012-12-12 22:59:46 +0000 |
| commit | 7212ee4534066fa03d361763d5d7195c7a51c521 (patch) | |
| tree | 68af377faa0f2e1f664086c10248fba3436629de /llvm/lib/MC/MCStreamer.cpp | |
| parent | 1f7321677cebda7fd2bf0adf18afb910f098559f (diff) | |
| download | bcm5719-llvm-7212ee4534066fa03d361763d5d7195c7a51c521.tar.gz bcm5719-llvm-7212ee4534066fa03d361763d5d7195c7a51c521.zip | |
Make the MCStreamer have a reset method and call that after finalization of the asm printer,
also changed MCContext to a single reset only method for simplicity as requested on the list
llvm-svn: 170041
Diffstat (limited to 'llvm/lib/MC/MCStreamer.cpp')
| -rw-r--r-- | llvm/lib/MC/MCStreamer.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/llvm/lib/MC/MCStreamer.cpp b/llvm/lib/MC/MCStreamer.cpp index 96d6d691d26..047ab636ab7 100644 --- a/llvm/lib/MC/MCStreamer.cpp +++ b/llvm/lib/MC/MCStreamer.cpp @@ -34,6 +34,19 @@ MCStreamer::~MCStreamer() { delete W64UnwindInfos[i]; } +void MCStreamer::reset() { + for (unsigned i = 0; i < getNumW64UnwindInfos(); ++i) + delete W64UnwindInfos[i]; + EmitEHFrame = true; + EmitDebugFrame = false; + CurrentW64UnwindInfo = 0; + LastSymbol = 0; + AutoInitSections = false; + const MCSection *section = NULL; + SectionStack.clear(); + SectionStack.push_back(std::make_pair(section, section)); +} + const MCExpr *MCStreamer::BuildSymbolDiff(MCContext &Context, const MCSymbol *A, const MCSymbol *B) { |

