summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/LiveInterval.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-09-06 01:07:24 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-09-06 01:07:24 +0000
commitd059eed1c14db51c4910d2468a01f84c33f188b1 (patch)
treef8ad0c950dd62ad8c9217efa900633af2edb2002 /llvm/lib/CodeGen/LiveInterval.cpp
parentb56a9909556aee1670e88adcf8b0a56dc25c5c9e (diff)
downloadbcm5719-llvm-d059eed1c14db51c4910d2468a01f84c33f188b1.tar.gz
bcm5719-llvm-d059eed1c14db51c4910d2468a01f84c33f188b1.zip
Fix a memory leak.
llvm-svn: 41739
Diffstat (limited to 'llvm/lib/CodeGen/LiveInterval.cpp')
-rw-r--r--llvm/lib/CodeGen/LiveInterval.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/LiveInterval.cpp b/llvm/lib/CodeGen/LiveInterval.cpp
index 4d38f0adcfa..9b4872d8308 100644
--- a/llvm/lib/CodeGen/LiveInterval.cpp
+++ b/llvm/lib/CodeGen/LiveInterval.cpp
@@ -476,7 +476,9 @@ void LiveInterval::MergeValueNumberInto(VNInfo *V1, VNInfo *V2) {
// ~1U so it can be nuked later.
if (V1->id == getNumValNums()-1) {
do {
+ VNInfo *VNI = valnos.back();
valnos.pop_back();
+ VNI->~VNInfo();
} while (valnos.back()->def == ~1U);
} else {
V1->def = ~1U;
OpenPOWER on IntegriCloud