fix leakage of APSInt in getVal()

llvm-svn: 58693
This commit is contained in:
Nuno Lopes 2008-11-04 14:26:58 +00:00
parent 5496d4caa0
commit 724e67ec75
1 changed files with 1 additions and 0 deletions

View 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);
}