[MemorySSA] Fixed null check after dereferencing warning. NFCI.
authorDávid Bolvanský <david.bolvansky@gmail.com>
Sun, 3 Nov 2019 19:27:40 +0000 (20:27 +0100)
committerDávid Bolvanský <david.bolvansky@gmail.com>
Sun, 3 Nov 2019 19:27:40 +0000 (20:27 +0100)
llvm/lib/Analysis/MemorySSA.cpp

index cfb8b7e..da2d0f8 100644 (file)
@@ -1229,6 +1229,7 @@ MemorySSA::MemorySSA(Function &Func, AliasAnalysis *AA, DominatorTree *DT)
   // safe because there are no CFG changes while building MemorySSA and can
   // significantly reduce the time spent by the compiler in AA, because we will
   // make queries about all the instructions in the Function.
+  assert(AA && "No alias analysis?");
   BatchAAResults BatchAA(*AA);
   buildMemorySSA(BatchAA);
   // Intentionally leave AA to nullptr while building so we don't accidently