diff options
author | Victor Hernandez <vhernandez@apple.com> | 2009-10-23 00:59:10 +0000 |
---|---|---|
committer | Victor Hernandez <vhernandez@apple.com> | 2009-10-23 00:59:10 +0000 |
commit | 336ea06493dfa03352d04d94cc8bc2c3c29f8165 (patch) | |
tree | d3624fda351a9fe31da1aa53aa762d4fcff6caa0 | |
parent | dfd85c142f184ba3ce5562f0eed32a908c59c076 (diff) | |
download | external_llvm-336ea06493dfa03352d04d94cc8bc2c3c29f8165.zip external_llvm-336ea06493dfa03352d04d94cc8bc2c3c29f8165.tar.gz external_llvm-336ea06493dfa03352d04d94cc8bc2c3c29f8165.tar.bz2 |
Minor code cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84919 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/AsmParser/LLParser.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/AsmParser/LLParser.cpp b/lib/AsmParser/LLParser.cpp index 8724470..271567b 100644 --- a/lib/AsmParser/LLParser.cpp +++ b/lib/AsmParser/LLParser.cpp @@ -3485,12 +3485,11 @@ bool LLParser::ParseAlloc(Instruction *&Inst, PerFunctionState &PFS, // Autoupgrade old malloc instruction to malloc call. // FIXME: Remove in LLVM 3.0. const Type *IntPtrTy = Type::getInt32Ty(Context); - const Type *Int8PtrTy = Type::getInt8PtrTy(Context); if (!MallocF) // Prototype malloc as "void *(int32)". // This function is renamed as "malloc" in ValidateEndOfModule(). - MallocF = cast<Function>(M->getOrInsertFunction(NULL, Int8PtrTy, - IntPtrTy, NULL)); + MallocF = cast<Function>( + M->getOrInsertFunction("", Type::getInt8PtrTy(Context), IntPtrTy, NULL)); Inst = CallInst::CreateMalloc(BB, IntPtrTy, Ty, Size, MallocF); return false; } |