From 43120f497385e2507816f4073b235f4da3a094aa Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Thu, 1 Nov 2012 11:16:47 +0000 Subject: [PATCH] Normalize the API and doxygen comments for the ptrtoint instruction. llvm-svn: 167227 --- llvm/include/llvm/Instructions.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/llvm/include/llvm/Instructions.h b/llvm/include/llvm/Instructions.h index 2e75ec5..d93b5a9 100644 --- a/llvm/include/llvm/Instructions.h +++ b/llvm/include/llvm/Instructions.h @@ -3642,9 +3642,16 @@ public: BasicBlock *InsertAtEnd ///< The block to insert the instruction into ); - /// \brief return the address space of the pointer. + /// \brief Gets the pointer operand. + Value *getPointerOperand() { return getOperand(0); } + /// \brief Gets the pointer operand. + const Value *getPointerOperand() const { return getOperand(0); } + /// \brief Gets the operand index of the pointer operand. + static unsigned getPointerOperandIndex() { return 0U; } + + /// \brief Returns the address space of the pointer operand. unsigned getPointerAddressSpace() const { - return getOperand(0)->getType()->getPointerAddressSpace(); + return getPointerOperand()->getType()->getPointerAddressSpace(); } // Methods for support type inquiry through isa, cast, and dyn_cast: -- 2.7.4