diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Instructions.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/llvm/Instructions.h b/include/llvm/Instructions.h index 237c1a8..841cf9c 100644 --- a/include/llvm/Instructions.h +++ b/include/llvm/Instructions.h @@ -531,6 +531,13 @@ public: static unsigned getPointerOperandIndex() { return 0U; // get index for modifying correct operand } + + /// getPointerOperandType - Method to return the pointer operand as a + /// PointerType. + const PointerType *getPointerOperandType() const { + return reinterpret_cast<const PointerType*>(getPointerOperand()->getType()); + } + unsigned getNumIndices() const { // Note: always non-negative return getNumOperands() - 1; |