[llvm-commits] [llvm] r113520 - /llvm/trunk/include/llvm/Instructions.h
Dan Gohman
gohman at apple.com
Thu Sep 9 11:32:40 PDT 2010
Author: djg
Date: Thu Sep 9 13:32:40 2010
New Revision: 113520
URL: http://llvm.org/viewvc/llvm-project?rev=113520&view=rev
Log:
Add a getPointerOperand() helper function to VAArgInst, for consistency
with LoadInst and StoreInst.
Modified:
llvm/trunk/include/llvm/Instructions.h
Modified: llvm/trunk/include/llvm/Instructions.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Instructions.h?rev=113520&r1=113519&r2=113520&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Instructions.h (original)
+++ llvm/trunk/include/llvm/Instructions.h Thu Sep 9 13:32:40 2010
@@ -1207,6 +1207,10 @@
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) {
More information about the llvm-commits
mailing list