Normalize the API and doxygen comments for the ptrtoint instruction.
authorChandler Carruth <chandlerc@gmail.com>
Thu, 1 Nov 2012 11:16:47 +0000 (11:16 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Thu, 1 Nov 2012 11:16:47 +0000 (11:16 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167227 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Instructions.h

index 2e75ec5f9abe47e9795a62770d54514350adb7d8..d93b5a925208b3693ebaa001251964324ece7d2d 100644 (file)
@@ -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: