mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-28 06:32:09 +00:00
Remove a memory leak, until ParamAttrsList is uniqued.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35823 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4522c8a44c
commit
3aad26e4da
@ -1098,7 +1098,11 @@ FunctionType *FunctionType::get(const Type *ReturnType,
|
|||||||
|
|
||||||
FunctionValType VT(ReturnType, Params, isVarArg, Attrs);
|
FunctionValType VT(ReturnType, Params, isVarArg, Attrs);
|
||||||
FunctionType *MT = FunctionTypes->get(VT);
|
FunctionType *MT = FunctionTypes->get(VT);
|
||||||
if (MT) return MT;
|
if (MT) {
|
||||||
|
delete Attrs; // not needed any more
|
||||||
|
return MT;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
MT = (FunctionType*) new char[sizeof(FunctionType) +
|
MT = (FunctionType*) new char[sizeof(FunctionType) +
|
||||||
sizeof(PATypeHandle)*(Params.size()+1)];
|
sizeof(PATypeHandle)*(Params.size()+1)];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user