diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2012-11-01 11:16:47 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2012-11-01 11:16:47 +0000 |
commit | 8a9674922911a2a02490dd8c4e5949085b774feb (patch) | |
tree | 7008ad4b214981e51205b1a95152ae6fe5faa507 /include | |
parent | 1521406a4b5b08209fb817a4673f636ef0fd8f46 (diff) | |
download | llvm-8a9674922911a2a02490dd8c4e5949085b774feb.tar.gz llvm-8a9674922911a2a02490dd8c4e5949085b774feb.tar.bz2 llvm-8a9674922911a2a02490dd8c4e5949085b774feb.tar.xz |
Normalize the API and doxygen comments for the ptrtoint instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167227 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Instructions.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/include/llvm/Instructions.h b/include/llvm/Instructions.h index 2e75ec5f9a..d93b5a9252 100644 --- a/include/llvm/Instructions.h +++ b/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: |