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 | e6ff7662b67a358cf985c5133f9cb30f9d979e97 (patch) | |
tree | 9b2d337a2da01bb61d8059dd4f0088f4e9cad744 /llvm/examples/BrainF/BrainF.cpp | |
parent | 5aec1b54bce5f7e916acb7d758e052b04e0c2996 (diff) | |
download | bcm5719-llvm-e6ff7662b67a358cf985c5133f9cb30f9d979e97.tar.gz bcm5719-llvm-e6ff7662b67a358cf985c5133f9cb30f9d979e97.zip |
Revert 82694 "Auto-upgrade malloc instructions to malloc calls." because it causes regressions in the nightly tests.
llvm-svn: 82784
Diffstat (limited to 'llvm/examples/BrainF/BrainF.cpp')
-rw-r--r-- | llvm/examples/BrainF/BrainF.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/llvm/examples/BrainF/BrainF.cpp b/llvm/examples/BrainF/BrainF.cpp index c64b87f2f39..5cf2b883bc4 100644 --- a/llvm/examples/BrainF/BrainF.cpp +++ b/llvm/examples/BrainF/BrainF.cpp @@ -25,7 +25,6 @@ #include "BrainF.h" #include "llvm/Constants.h" -#include "llvm/Instructions.h" #include "llvm/Intrinsics.h" #include "llvm/ADT/STLExtras.h" #include <iostream> @@ -79,11 +78,7 @@ void BrainF::header(LLVMContext& C) { //%arr = malloc i8, i32 %d ConstantInt *val_mem = ConstantInt::get(C, APInt(32, memtotal)); - BasicBlock* BB = builder->GetInsertBlock(); - const Type* IntPtrTy = IntegerType::getInt32Ty(C); - ptr_arr = CallInst::CreateMalloc(BB, IntPtrTy, IntegerType::getInt8Ty(C), - val_mem, NULL, "arr"); - BB->getInstList().push_back(cast<Instruction>(ptr_arr)); + ptr_arr = builder->CreateMalloc(IntegerType::getInt8Ty(C), val_mem, "arr"); //call void @llvm.memset.i32(i8 *%arr, i8 0, i32 %d, i32 1) { |