summaryrefslogtreecommitdiffstats
path: root/include/llvm/Instructions.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Instructions.h')
-rw-r--r--include/llvm/Instructions.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/include/llvm/Instructions.h b/include/llvm/Instructions.h
index 7b8231e..bef9aef 100644
--- a/include/llvm/Instructions.h
+++ b/include/llvm/Instructions.h
@@ -2526,27 +2526,26 @@ public:
/// indirect function invocation.
///
Function *getCalledFunction() const {
- return dyn_cast<Function>(getOperand(0));
+ return dyn_cast<Function>(Op<-3>());
}
/// getCalledValue - Get a pointer to the function that is invoked by this
/// instruction
- const Value *getCalledValue() const { return getOperand(0); }
- Value *getCalledValue() { return getOperand(0); }
+ const Value *getCalledValue() const { return Op<-3>(); }
+ Value *getCalledValue() { return Op<-3>(); }
// get*Dest - Return the destination basic blocks...
BasicBlock *getNormalDest() const {
- return cast<BasicBlock>(getOperand(1));
+ return cast<BasicBlock>(Op<-2>());
}
BasicBlock *getUnwindDest() const {
- return cast<BasicBlock>(getOperand(2));
+ return cast<BasicBlock>(Op<-1>());
}
void setNormalDest(BasicBlock *B) {
- setOperand(1, B);
+ Op<-2>() = B;
}
-
void setUnwindDest(BasicBlock *B) {
- setOperand(2, B);
+ Op<-1>() = B;
}
BasicBlock *getSuccessor(unsigned i) const {
@@ -2556,7 +2555,7 @@ public:
void setSuccessor(unsigned idx, BasicBlock *NewSucc) {
assert(idx < 2 && "Successor # out of range for invoke!");
- setOperand(idx+1, NewSucc);
+ *(&Op<-2>() + idx) = NewSucc;
}
unsigned getNumSuccessors() const { return 2; }
@@ -2569,6 +2568,7 @@ public:
static inline bool classof(const Value *V) {
return isa<Instruction>(V) && classof(cast<Instruction>(V));
}
+
private:
virtual BasicBlock *getSuccessorV(unsigned idx) const;
virtual unsigned getNumSuccessorsV() const;