diff options
author | Pedro Artigas <partigas@apple.com> | 2013-01-04 18:04:42 +0000 |
---|---|---|
committer | Pedro Artigas <partigas@apple.com> | 2013-01-04 18:04:42 +0000 |
commit | b9d1005e96681b5c8cc1ed959fa129de62933020 (patch) | |
tree | f2b9b160817bf2e13e953af6349551f9057749c3 | |
parent | 60230ef987f234df88a166fc7878cf3051bca0a1 (diff) | |
download | external_llvm-b9d1005e96681b5c8cc1ed959fa129de62933020.zip external_llvm-b9d1005e96681b5c8cc1ed959fa129de62933020.tar.gz external_llvm-b9d1005e96681b5c8cc1ed959fa129de62933020.tar.bz2 |
small fixes to enable the reuse of the pass manager across multiple modules
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171475 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/MachineModuleInfo.cpp | 4 | ||||
-rw-r--r-- | lib/MC/MCObjectStreamer.cpp | 1 | ||||
-rw-r--r-- | lib/MC/MCStreamer.cpp | 1 |
3 files changed, 4 insertions, 2 deletions
diff --git a/lib/CodeGen/MachineModuleInfo.cpp b/lib/CodeGen/MachineModuleInfo.cpp index 1869fe3..0ea9ae0 100644 --- a/lib/CodeGen/MachineModuleInfo.cpp +++ b/lib/CodeGen/MachineModuleInfo.cpp @@ -266,7 +266,6 @@ MachineModuleInfo::MachineModuleInfo() } MachineModuleInfo::~MachineModuleInfo() { - delete ObjFileMMI; } bool MachineModuleInfo::doInitialization(Module &M) { @@ -294,6 +293,9 @@ bool MachineModuleInfo::doFinalization(Module &M) { Context.reset(); + delete ObjFileMMI; + ObjFileMMI = 0; + return false; } diff --git a/lib/MC/MCObjectStreamer.cpp b/lib/MC/MCObjectStreamer.cpp index e36e181..6d5c0a5 100644 --- a/lib/MC/MCObjectStreamer.cpp +++ b/lib/MC/MCObjectStreamer.cpp @@ -47,6 +47,7 @@ MCObjectStreamer::~MCObjectStreamer() { void MCObjectStreamer::reset() { if (Assembler) Assembler->reset(); + CurSectionData = 0; MCStreamer::reset(); } diff --git a/lib/MC/MCStreamer.cpp b/lib/MC/MCStreamer.cpp index 6f0ada2..7dffc3e 100644 --- a/lib/MC/MCStreamer.cpp +++ b/lib/MC/MCStreamer.cpp @@ -41,7 +41,6 @@ void MCStreamer::reset() { EmitDebugFrame = false; CurrentW64UnwindInfo = 0; LastSymbol = 0; - AutoInitSections = false; const MCSection *section = NULL; SectionStack.clear(); SectionStack.push_back(std::make_pair(section, section)); |