mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-27 15:29:51 +00:00
Minor code cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84919 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
dfd85c142f
commit
336ea06493
@ -3485,12 +3485,11 @@ bool LLParser::ParseAlloc(Instruction *&Inst, PerFunctionState &PFS,
|
|||||||
// Autoupgrade old malloc instruction to malloc call.
|
// Autoupgrade old malloc instruction to malloc call.
|
||||||
// FIXME: Remove in LLVM 3.0.
|
// FIXME: Remove in LLVM 3.0.
|
||||||
const Type *IntPtrTy = Type::getInt32Ty(Context);
|
const Type *IntPtrTy = Type::getInt32Ty(Context);
|
||||||
const Type *Int8PtrTy = Type::getInt8PtrTy(Context);
|
|
||||||
if (!MallocF)
|
if (!MallocF)
|
||||||
// Prototype malloc as "void *(int32)".
|
// Prototype malloc as "void *(int32)".
|
||||||
// This function is renamed as "malloc" in ValidateEndOfModule().
|
// This function is renamed as "malloc" in ValidateEndOfModule().
|
||||||
MallocF = cast<Function>(M->getOrInsertFunction(NULL, Int8PtrTy,
|
MallocF = cast<Function>(
|
||||||
IntPtrTy, NULL));
|
M->getOrInsertFunction("", Type::getInt8PtrTy(Context), IntPtrTy, NULL));
|
||||||
Inst = CallInst::CreateMalloc(BB, IntPtrTy, Ty, Size, MallocF);
|
Inst = CallInst::CreateMalloc(BB, IntPtrTy, Ty, Size, MallocF);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user