From 91c2620862b57dc1849021b13734292b7826a945 Mon Sep 17 00:00:00 2001 From: Nuno Lopes Date: Tue, 4 Nov 2008 14:26:58 +0000 Subject: [PATCH] fix leakage of APSInt in getVal() git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58693 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/AsmParser/llvmAsmParser.y | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/AsmParser/llvmAsmParser.y b/lib/AsmParser/llvmAsmParser.y index f2e6404d307..d76994a431a 100644 --- a/lib/AsmParser/llvmAsmParser.y +++ b/lib/AsmParser/llvmAsmParser.y @@ -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); }