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 | d059eed1c14db51c4910d2468a01f84c33f188b1 (patch) | |
tree | f8ad0c950dd62ad8c9217efa900633af2edb2002 /llvm/lib/CodeGen/LiveIntervalAnalysis.cpp | |
parent | b56a9909556aee1670e88adcf8b0a56dc25c5c9e (diff) | |
download | bcm5719-llvm-d059eed1c14db51c4910d2468a01f84c33f188b1.tar.gz bcm5719-llvm-d059eed1c14db51c4910d2468a01f84c33f188b1.zip |
Fix a memory leak.
llvm-svn: 41739
Diffstat (limited to 'llvm/lib/CodeGen/LiveIntervalAnalysis.cpp')
-rw-r--r-- | llvm/lib/CodeGen/LiveIntervalAnalysis.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp index 2f93b769485..3d324b7bfc6 100644 --- a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp +++ b/llvm/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]; } |