diff options
author | Victor Hernandez <vhernandez@apple.com> | 2009-09-25 18:11:52 +0000 |
---|---|---|
committer | Victor Hernandez <vhernandez@apple.com> | 2009-09-25 18:11:52 +0000 |
commit | 3e0c99a26f365bddb667124db40a5734e35c5a2d (patch) | |
tree | 406ef499eb4ee0c0b5f704d726d1d9c39ad79694 /lib/VMCore/Core.cpp | |
parent | a45bfd31de14321262dd5f5123d04fc953a79ff1 (diff) |
Revert 82694 "Auto-upgrade malloc instructions to malloc calls." because it causes regressions in the nightly tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82784 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Core.cpp')
-rw-r--r-- | lib/VMCore/Core.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/VMCore/Core.cpp b/lib/VMCore/Core.cpp index 248127df72..1dbf5c44ef 100644 --- a/lib/VMCore/Core.cpp +++ b/lib/VMCore/Core.cpp @@ -1636,16 +1636,12 @@ LLVMValueRef LLVMBuildNot(LLVMBuilderRef B, LLVMValueRef V, const char *Name) { LLVMValueRef LLVMBuildMalloc(LLVMBuilderRef B, LLVMTypeRef Ty, const char *Name) { - const Type* IntPtrT = Type::getInt32Ty(unwrap(B)->GetInsertBlock()->getContext()); - return wrap(CallInst::CreateMalloc(unwrap(B)->GetInsertBlock(), IntPtrT, - unwrap(Ty), 0, 0, Twine(Name))); + return wrap(unwrap(B)->CreateMalloc(unwrap(Ty), 0, Name)); } LLVMValueRef LLVMBuildArrayMalloc(LLVMBuilderRef B, LLVMTypeRef Ty, LLVMValueRef Val, const char *Name) { - const Type* IntPtrT = Type::getInt32Ty(unwrap(B)->GetInsertBlock()->getContext()); - return wrap(CallInst::CreateMalloc(unwrap(B)->GetInsertBlock(), IntPtrT, - unwrap(Ty), unwrap(Val), 0, Twine(Name))); + return wrap(unwrap(B)->CreateMalloc(unwrap(Ty), unwrap(Val), Name)); } LLVMValueRef LLVMBuildAlloca(LLVMBuilderRef B, LLVMTypeRef Ty, |