[llvm] r364247 - [NFC] Add missing consts into memoryaccess_def_iterator

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 24 15:42:53 PDT 2019


Author: vitalybuka
Date: Mon Jun 24 15:42:53 2019
New Revision: 364247

URL: http://llvm.org/viewvc/llvm-project?rev=364247&view=rev
Log:
[NFC] Add missing consts into memoryaccess_def_iterator

Modified:
    llvm/trunk/include/llvm/Analysis/MemorySSA.h

Modified: llvm/trunk/include/llvm/Analysis/MemorySSA.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/MemorySSA.h?rev=364247&r1=364246&r2=364247&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/MemorySSA.h (original)
+++ llvm/trunk/include/llvm/Analysis/MemorySSA.h Mon Jun 24 15:42:53 2019
@@ -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;




More information about the llvm-commits mailing list