fix leakage of APSInt in getVal()
authorNuno Lopes <nunoplopes@sapo.pt>
Tue, 4 Nov 2008 14:26:58 +0000 (14:26 +0000)
committerNuno Lopes <nunoplopes@sapo.pt>
Tue, 4 Nov 2008 14:26:58 +0000 (14:26 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58693 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AsmParser/llvmAsmParser.y

index f2e6404d307cc6d0633e55137e7565ad60a330cb..d76994a431a0e7617f390751537465c774a58701 100644 (file)
@@ -418,6 +418,7 @@ static Value *getExistingVal(const Type *Ty, const ValID &D) {
 
     {
       APSInt Tmp = *D.ConstPoolInt;
+      D.destroy();
       Tmp.extOrTrunc(Ty->getPrimitiveSizeInBits());
       return ConstantInt::get(Tmp);
     }