diff options
Diffstat (limited to 'include/llvm/IR/Operator.h')
-rw-r--r-- | include/llvm/IR/Operator.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/llvm/IR/Operator.h b/include/llvm/IR/Operator.h index 46935ce..c87f89c 100644 --- a/include/llvm/IR/Operator.h +++ b/include/llvm/IR/Operator.h @@ -400,6 +400,11 @@ public: return getPointerOperand()->getType(); } + Type *getSourceElementType() const { + return cast<SequentialType>(getPointerOperandType()->getScalarType()) + ->getElementType(); + } + /// Method to return the address space of the pointer operand. unsigned getPointerAddressSpace() const { return getPointerOperandType()->getPointerAddressSpace(); |