summaryrefslogtreecommitdiffstats
path: root/include/llvm/iPHINode.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/iPHINode.h')
-rw-r--r--include/llvm/iPHINode.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/iPHINode.h b/include/llvm/iPHINode.h
index 287ba90..93b6e7c 100644
--- a/include/llvm/iPHINode.h
+++ b/include/llvm/iPHINode.h
@@ -42,6 +42,9 @@ public:
void setIncomingValue(unsigned i, Value *V) {
Operands[i*2] = V;
}
+ inline unsigned getOperandNumForIncomingValue(unsigned i) {
+ return i*2;
+ }
/// getIncomingBlock - Return incoming basic block #x
const BasicBlock *getIncomingBlock(unsigned i) const {
@@ -53,6 +56,9 @@ public:
inline void setIncomingBlock(unsigned i, BasicBlock *BB) {
Operands[i*2+1] = (Value*)BB;
}
+ inline unsigned getOperandNumForIncomingBlock(unsigned i) {
+ return i*2+1;
+ }
/// addIncoming - Add an incoming value to the end of the PHI list
void addIncoming(Value *D, BasicBlock *BB);