summaryrefslogtreecommitdiff
path: root/lib/MC/MCStreamer.cpp
diff options
context:
space:
mode:
authorPedro Artigas <partigas@apple.com>2012-12-12 22:59:46 +0000
committerPedro Artigas <partigas@apple.com>2012-12-12 22:59:46 +0000
commit5399d2502acaf96fe8420e61913e77f0b23650ff (patch)
tree0a88b5a320500c2eeae8320ce4bd46014af30ef9 /lib/MC/MCStreamer.cpp
parent5749801caaf523e2e151eea4cacc87299a4b3822 (diff)
downloadllvm-5399d2502acaf96fe8420e61913e77f0b23650ff.tar.gz
llvm-5399d2502acaf96fe8420e61913e77f0b23650ff.tar.bz2
llvm-5399d2502acaf96fe8420e61913e77f0b23650ff.tar.xz
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170041 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MCStreamer.cpp')
-rw-r--r--lib/MC/MCStreamer.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/MC/MCStreamer.cpp b/lib/MC/MCStreamer.cpp
index 96d6d691d2..047ab636ab 100644
--- a/lib/MC/MCStreamer.cpp
+++ b/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) {