summaryrefslogtreecommitdiff
path: root/lib/MC/MCContext.cpp
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2012-12-06 02:00:13 +0000
committerNAKAMURA Takumi <geek4civic@gmail.com>2012-12-06 02:00:13 +0000
commitc7078924f044584d9e9b277862d34d5b43ff2b1e (patch)
treeea36b14f70686a96e331222f081147b2e36c7220 /lib/MC/MCContext.cpp
parentc9758b13668013dea491a08b4f0c9256263927c2 (diff)
downloadllvm-c7078924f044584d9e9b277862d34d5b43ff2b1e.tar.gz
llvm-c7078924f044584d9e9b277862d34d5b43ff2b1e.tar.bz2
llvm-c7078924f044584d9e9b277862d34d5b43ff2b1e.tar.xz
Revert r169456, "change MCContext to work on the doInitialization/doFinalization model"
It broke many builders. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169462 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MCContext.cpp')
-rw-r--r--lib/MC/MCContext.cpp37
1 files changed, 6 insertions, 31 deletions
diff --git a/lib/MC/MCContext.cpp b/lib/MC/MCContext.cpp
index cd95b1161a..dd9d956088 100644
--- a/lib/MC/MCContext.cpp
+++ b/lib/MC/MCContext.cpp
@@ -44,48 +44,23 @@ MCContext::MCContext(const MCAsmInfo &mai, const MCRegisterInfo &mri,
SecureLogFile = getenv("AS_SECURE_LOG_FILE");
SecureLog = 0;
SecureLogUsed = false;
-}
-
-MCContext::~MCContext() {
- // NOTE: The symbols are all allocated out of a bump pointer allocator,
- // we don't need to free them here.
-
- // If the stream for the .secure_log_unique directive was created free it.
- delete (raw_ostream*)SecureLog;
-}
-
-//===----------------------------------------------------------------------===//
-// Module Lifetime Management
-//===----------------------------------------------------------------------===//
-void MCContext::doInitialization() {
- NextUniqueID = 0;
- AllowTemporaryLabels = true;
DwarfLocSeen = false;
GenDwarfForAssembly = false;
GenDwarfFileNumber = 0;
}
-void MCContext::doFinalization() {
- UsedNames.clear();
- Symbols.clear();
- Allocator.Reset();
- Instances.clear();
- MCDwarfFiles.clear();
- MCDwarfDirs.clear();
- MCGenDwarfLabelEntries.clear();
- DwarfDebugFlags = StringRef();
- MCLineSections.clear();
- MCLineSectionOrder.clear();
- CurrentDwarfLoc = MCDwarfLoc(0,0,0,DWARF2_FLAG_IS_STMT,0,0);
+MCContext::~MCContext() {
+ // NOTE: The symbols are all allocated out of a bump pointer allocator,
+ // we don't need to free them here.
// If we have the MachO uniquing map, free it.
delete (MachOUniqueMapTy*)MachOUniquingMap;
delete (ELFUniqueMapTy*)ELFUniquingMap;
delete (COFFUniqueMapTy*)COFFUniquingMap;
- MachOUniquingMap = 0;
- ELFUniquingMap = 0;
- COFFUniquingMap = 0;
+
+ // If the stream for the .secure_log_unique directive was created free it.
+ delete (raw_ostream*)SecureLog;
}
//===----------------------------------------------------------------------===//