summaryrefslogtreecommitdiff
path: root/include/llvm/Instructions.h
diff options
context:
space:
mode:
authorVictor Hernandez <vhernandez@apple.com>2009-10-17 00:00:19 +0000
committerVictor Hernandez <vhernandez@apple.com>2009-10-17 00:00:19 +0000
commit13ad5aaaff8a446758b402fd5e9aea22f5bc5682 (patch)
tree02a18132aa0c90ad96e5aafeaea17439bb9cb5c2 /include/llvm/Instructions.h
parent8db42d2b1ce05e69b67f37c4e56a0f987a0c01d7 (diff)
downloadllvm-13ad5aaaff8a446758b402fd5e9aea22f5bc5682.tar.gz
llvm-13ad5aaaff8a446758b402fd5e9aea22f5bc5682.tar.bz2
llvm-13ad5aaaff8a446758b402fd5e9aea22f5bc5682.tar.xz
Autoupgrade malloc insts to malloc calls.
Update testcases that rely on malloc insts being present. Also prematurely remove MallocInst handling from IndMemRemoval and RaiseAllocations to help pass tests in this incremental step. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84292 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Instructions.h')
-rw-r--r--include/llvm/Instructions.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/llvm/Instructions.h b/include/llvm/Instructions.h
index b28fcbb951..d9e59ed3a2 100644
--- a/include/llvm/Instructions.h
+++ b/include/llvm/Instructions.h
@@ -1047,7 +1047,7 @@ public:
const Twine &Name = "");
static Value *CreateMalloc(BasicBlock *InsertAtEnd, const Type *IntPtrTy,
const Type *AllocTy, Value *ArraySize = 0,
- const Twine &Name = "");
+ Function* MallocF = 0, const Twine &Name = "");
~CallInst();
@@ -1152,6 +1152,11 @@ public:
const Value *getCalledValue() const { return Op<0>(); }
Value *getCalledValue() { return Op<0>(); }
+ /// setCalledFunction - Set the function called
+ void setCalledFunction(Value* Fn) {
+ Op<0>() = Fn;
+ }
+
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const CallInst *) { return true; }
static inline bool classof(const Instruction *I) {