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 | 2981d1b93d45ae0664970b845fd90c9c3e951315 (patch) | |
tree | 630db220984fe40edc98e1e6407cf2c9508b6352 /llvm/lib | |
parent | 6aea1a2a5a8979aa035d69a0c772c0a42302eafd (diff) | |
download | bcm5719-llvm-2981d1b93d45ae0664970b845fd90c9c3e951315.tar.gz bcm5719-llvm-2981d1b93d45ae0664970b845fd90c9c3e951315.zip |
Minor code cleanup.
llvm-svn: 84919
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/AsmParser/LLParser.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp index 8724470c9bb..271567bd1e9 100644 --- a/llvm/lib/AsmParser/LLParser.cpp +++ b/llvm/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; } |