diff options
author | Victor Hernandez <vhernandez@apple.com> | 2009-10-17 00:00:19 +0000 |
---|---|---|
committer | Victor Hernandez <vhernandez@apple.com> | 2009-10-17 00:00:19 +0000 |
commit | 13ad5aaaff8a446758b402fd5e9aea22f5bc5682 (patch) | |
tree | 02a18132aa0c90ad96e5aafeaea17439bb9cb5c2 /include/llvm | |
parent | 8db42d2b1ce05e69b67f37c4e56a0f987a0c01d7 (diff) | |
download | external_llvm-13ad5aaaff8a446758b402fd5e9aea22f5bc5682.zip external_llvm-13ad5aaaff8a446758b402fd5e9aea22f5bc5682.tar.gz external_llvm-13ad5aaaff8a446758b402fd5e9aea22f5bc5682.tar.bz2 |
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')
-rw-r--r-- | include/llvm/Instructions.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/llvm/Instructions.h b/include/llvm/Instructions.h index b28fcbb..d9e59ed 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) { |