summaryrefslogtreecommitdiff
path: root/include/llvm/Instructions.h
diff options
context:
space:
mode:
authorGabor Greif <ggreif@gmail.com>2010-03-20 21:00:25 +0000
committerGabor Greif <ggreif@gmail.com>2010-03-20 21:00:25 +0000
commit654c06f6457f80428e40810ad251c412462731e4 (patch)
treefad6797f10e35c67c651371c56650ba1357a6dfc /include/llvm/Instructions.h
parent25eb5013d0516e7ba5105a1ca25c9f61d2ddb0b2 (diff)
downloadllvm-654c06f6457f80428e40810ad251c412462731e4.tar.gz
llvm-654c06f6457f80428e40810ad251c412462731e4.tar.bz2
llvm-654c06f6457f80428e40810ad251c412462731e4.tar.xz
Add a setCalledFunction member to InvokeInst (like in CallInst)
and use this (as well as getCalledValue) to access the callee, instead of {g|s}etOperand(0). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99084 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Instructions.h')
-rw-r--r--include/llvm/Instructions.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/llvm/Instructions.h b/include/llvm/Instructions.h
index 80b7ca4f82..b1f1996045 100644
--- a/include/llvm/Instructions.h
+++ b/include/llvm/Instructions.h
@@ -2516,6 +2516,11 @@ public:
const Value *getCalledValue() const { return getOperand(0); }
Value *getCalledValue() { return getOperand(0); }
+ /// setCalledFunction - Set the function called.
+ void setCalledFunction(Value* Fn) {
+ Op<0>() = Fn;
+ }
+
// get*Dest - Return the destination basic blocks...
BasicBlock *getNormalDest() const {
return cast<BasicBlock>(getOperand(1));