[llvm-commits] [llvm] r167227 - /llvm/trunk/include/llvm/Instructions.h
Chandler Carruth
chandlerc at gmail.com
Thu Nov 1 04:16:47 PDT 2012
Author: chandlerc
Date: Thu Nov 1 06:16:47 2012
New Revision: 167227
URL: http://llvm.org/viewvc/llvm-project?rev=167227&view=rev
Log:
Normalize the API and doxygen comments for the ptrtoint instruction.
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=167227&r1=167226&r2=167227&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Instructions.h (original)
+++ llvm/trunk/include/llvm/Instructions.h Thu Nov 1 06:16:47 2012
@@ -3642,9 +3642,16 @@
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:
More information about the llvm-commits
mailing list