mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-07-22 09:29:31 +00:00
fix leakage of APSInt in getVal()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58693 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7ecbfd1157
commit
91c2620862
@ -418,6 +418,7 @@ static Value *getExistingVal(const Type *Ty, const ValID &D) {
|
|||||||
|
|
||||||
{
|
{
|
||||||
APSInt Tmp = *D.ConstPoolInt;
|
APSInt Tmp = *D.ConstPoolInt;
|
||||||
|
D.destroy();
|
||||||
Tmp.extOrTrunc(Ty->getPrimitiveSizeInBits());
|
Tmp.extOrTrunc(Ty->getPrimitiveSizeInBits());
|
||||||
return ConstantInt::get(Tmp);
|
return ConstantInt::get(Tmp);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user