aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-09-09 18:32:40 +0000
committerDan Gohman <gohman@apple.com>2010-09-09 18:32:40 +0000
commite744541788298d0ef129aa2d38e9aef865218311 (patch)
treef7599fb6a69efec1516aa1b4b6901c06847b9e45
parent5f54ce347368105260be2cec497b6a4199dc5789 (diff)
downloadexternal_llvm-e744541788298d0ef129aa2d38e9aef865218311.zip
external_llvm-e744541788298d0ef129aa2d38e9aef865218311.tar.gz
external_llvm-e744541788298d0ef129aa2d38e9aef865218311.tar.bz2
Add a getPointerOperand() helper function to VAArgInst, for consistency
with LoadInst and StoreInst. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113520 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/Instructions.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/llvm/Instructions.h b/include/llvm/Instructions.h
index bd1e889..a17fb9f 100644
--- a/include/llvm/Instructions.h
+++ b/include/llvm/Instructions.h
@@ -1207,6 +1207,10 @@ public:
setName(NameStr);
}
+ Value *getPointerOperand() { return getOperand(0); }
+ const Value *getPointerOperand() const { return getOperand(0); }
+ static unsigned getPointerOperandIndex() { return 0U; }
+
// Methods for support type inquiry through isa, cast, and dyn_cast:
static inline bool classof(const VAArgInst *) { return true; }
static inline bool classof(const Instruction *I) {