Provide const version of function with the name the other will be eventually renamed to
authorChris Lattner <sabre@nondot.org>
Sat, 10 Nov 2001 06:48:14 +0000 (06:48 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 10 Nov 2001 06:48:14 +0000 (06:48 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1241 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/iMemory.h

index f3ec30281da95dc5000f64271cefa9b0502e7d9e..29518686cfef0f49a106fbe09ad5f2bac2d97b1e 100644 (file)
@@ -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;
 };