]> granicus.if.org Git - llvm/commitdiff
[MemorySSA] Verify MSSAUpdater exists.
authorAlina Sbirlea <asbirlea@google.com>
Thu, 5 Sep 2019 16:58:15 +0000 (16:58 +0000)
committerAlina Sbirlea <asbirlea@google.com>
Thu, 5 Sep 2019 16:58:15 +0000 (16:58 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371087 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Utils/BasicBlockUtils.cpp

index 45c0b026a47936ee0b3f7e79d95b7df8b55177bb..d4c718df4a4442c28d1a7586f6375990c75ec732 100644 (file)
@@ -251,7 +251,8 @@ bool llvm::MergeBlockIntoPredecessor(BasicBlock *BB, DomTreeUpdater *DTU,
       for (auto &DVI : DbgValues) {
         auto R = DbgValueSet.insert({DVI->getVariable(), DVI->getExpression()});
         if (!R.second) {
-          MSSAU->removeMemoryAccess(DVI);
+          if (MSSAU)
+            MSSAU->removeMemoryAccess(DVI);
           DVI->eraseFromParent();
         }
       }