projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6688d75
)
add a helper method.
author
Chris Lattner
<sabre@nondot.org>
Fri, 9 Jan 2009 05:27:40 +0000
(
05:27
+0000)
committer
Chris Lattner
<sabre@nondot.org>
Fri, 9 Jan 2009 05:27:40 +0000
(
05:27
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61978
91177308
-0d34-0410-b5e6-
96231b3b80d8
include/llvm/Instructions.h
patch
|
blob
|
history
diff --git
a/include/llvm/Instructions.h
b/include/llvm/Instructions.h
index 237c1a80981db49a303f8e52958ed525857f7563..841cf9cff27ff4e674615dd54eb4e02343f46917 100644
(file)
--- 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;