OSDN Git Service

[NFC] Add missing consts into memoryaccess_def_iterator
authorVitaly Buka <vitalybuka@google.com>
Mon, 24 Jun 2019 22:42:53 +0000 (22:42 +0000)
committerVitaly Buka <vitalybuka@google.com>
Mon, 24 Jun 2019 22:42:53 +0000 (22:42 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364247 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Analysis/MemorySSA.h

index a0a1030..b7730be 100644 (file)
@@ -1106,15 +1106,15 @@ public:
     assert(Access && "Tried to access past the end of our iterator");
     // Go to the first argument for phis, and the defining access for everything
     // else.
-    if (MemoryPhi *MP = dyn_cast<MemoryPhi>(Access))
+    if (const MemoryPhi *MP = dyn_cast<MemoryPhi>(Access))
       return MP->getIncomingValue(ArgNo);
     return cast<MemoryUseOrDef>(Access)->getDefiningAccess();
   }
 
   using BaseT::operator++;
-  memoryaccess_def_iterator &operator++() {
+  memoryaccess_def_iterator_base &operator++() {
     assert(Access && "Hit end of iterator");
-    if (MemoryPhi *MP = dyn_cast<MemoryPhi>(Access)) {
+    if (const MemoryPhi *MP = dyn_cast<MemoryPhi>(Access)) {
       if (++ArgNo >= MP->getNumIncomingValues()) {
         ArgNo = 0;
         Access = nullptr;