diff options
author | Evan Cheng <evan.cheng@apple.com> | 2007-09-06 01:07:24 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2007-09-06 01:07:24 +0000 |
commit | 27344d4cb30a4f71ff4b924d99474e747cdb65dd (patch) | |
tree | 6da1c375907b3e11438ef39f82e0b1b2ba9cd403 /lib/CodeGen/LiveIntervalAnalysis.cpp | |
parent | 0b1e87160a8d6ad2ae87d33f16f65c58b8c67bb0 (diff) | |
download | external_llvm-27344d4cb30a4f71ff4b924d99474e747cdb65dd.zip external_llvm-27344d4cb30a4f71ff4b924d99474e747cdb65dd.tar.gz external_llvm-27344d4cb30a4f71ff4b924d99474e747cdb65dd.tar.bz2 |
Fix a memory leak.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41739 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/LiveIntervalAnalysis.cpp')
-rw-r--r-- | lib/CodeGen/LiveIntervalAnalysis.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/LiveIntervalAnalysis.cpp b/lib/CodeGen/LiveIntervalAnalysis.cpp index 2f93b76..3d324b7 100644 --- a/lib/CodeGen/LiveIntervalAnalysis.cpp +++ b/lib/CodeGen/LiveIntervalAnalysis.cpp @@ -62,10 +62,11 @@ void LiveIntervals::getAnalysisUsage(AnalysisUsage &AU) const { } void LiveIntervals::releaseMemory() { - VNInfoAllocator.Reset(); mi2iMap_.clear(); i2miMap_.clear(); r2iMap_.clear(); + // Release VNInfo memroy regions after all VNInfo objects are dtor'd. + VNInfoAllocator.Reset(); for (unsigned i = 0, e = ClonedMIs.size(); i != e; ++i) delete ClonedMIs[i]; } |