diff options
-rw-r--r-- | include/llvm/iMemory.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/llvm/iMemory.h b/include/llvm/iMemory.h index f3ec30281d..29518686cf 100644 --- a/include/llvm/iMemory.h +++ b/include/llvm/iMemory.h @@ -187,6 +187,9 @@ public: inline bool hasIndices() const { return !indexVec.empty(); } virtual Value *getPtrOperand() = 0; + const Value *getPointerOperand() const { + return ((MemAccessInst*)this)->getPtrOperand(); + } virtual int getFirstOffsetIdx() const = 0; }; |