[llvm-commits] [llvm] r84919 - /llvm/trunk/lib/AsmParser/LLParser.cpp
Victor Hernandez
vhernandez at apple.com
Thu Oct 22 17:59:10 PDT 2009
Author: hernande
Date: Thu Oct 22 19:59:10 2009
New Revision: 84919
URL: http://llvm.org/viewvc/llvm-project?rev=84919&view=rev
Log:
Minor code cleanup.
Modified:
llvm/trunk/lib/AsmParser/LLParser.cpp
Modified: llvm/trunk/lib/AsmParser/LLParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/LLParser.cpp?rev=84919&r1=84918&r2=84919&view=diff
==============================================================================
--- llvm/trunk/lib/AsmParser/LLParser.cpp (original)
+++ llvm/trunk/lib/AsmParser/LLParser.cpp Thu Oct 22 19:59:10 2009
@@ -3485,12 +3485,11 @@
// 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;
}
More information about the llvm-commits
mailing list