diff options
author | Victor Hernandez <vhernandez@apple.com> | 2009-09-24 17:47:49 +0000 |
---|---|---|
committer | Victor Hernandez <vhernandez@apple.com> | 2009-09-24 17:47:49 +0000 |
commit | 96b930ddc7f0df9e278a5cb65ad77a559a20964e (patch) | |
tree | dd7af062fff46c35323ed13331eda6126609cf91 /include/llvm/Instructions.h | |
parent | c34666ee1871d47dfa4865c7138902dd1b770101 (diff) | |
download | external_llvm-96b930ddc7f0df9e278a5cb65ad77a559a20964e.zip external_llvm-96b930ddc7f0df9e278a5cb65ad77a559a20964e.tar.gz external_llvm-96b930ddc7f0df9e278a5cb65ad77a559a20964e.tar.bz2 |
Auto-upgrade malloc instructions to malloc calls.
Reviewed by Devang Patel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82694 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Instructions.h')
-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 fbee2af..f2832c8 100644 --- a/include/llvm/Instructions.h +++ b/include/llvm/Instructions.h @@ -1044,7 +1044,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(); @@ -1149,6 +1149,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) { |