From e744541788298d0ef129aa2d38e9aef865218311 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Thu, 9 Sep 2010 18:32:40 +0000 Subject: [PATCH] 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 --- include/llvm/Instructions.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/llvm/Instructions.h b/include/llvm/Instructions.h index bd1e889de07..a17fb9fc197 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) {