From c8071a0f0ffc0a7df02119c062b345eaaa3e3348 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Wed, 2 Oct 2019 13:09:12 +0000 Subject: [PATCH] MemorySSAUpdater::applyInsertUpdates - silence static analyzer dyn_cast null dereference warning. NFCI. The static analyzer is warning about a potential null dereference, but we should be able to use cast directly and if not assert will fire for us. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373467 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Analysis/MemorySSAUpdater.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Analysis/MemorySSAUpdater.cpp b/lib/Analysis/MemorySSAUpdater.cpp index e0b27f1d501..6018968c199 100644 --- a/lib/Analysis/MemorySSAUpdater.cpp +++ b/lib/Analysis/MemorySSAUpdater.cpp @@ -1082,7 +1082,7 @@ void MemorySSAUpdater::applyInsertUpdates(ArrayRef Updates, for (; UI != E;) { Use &U = *UI; ++UI; - MemoryAccess *Usr = dyn_cast(U.getUser()); + MemoryAccess *Usr = cast(U.getUser()); if (MemoryPhi *UsrPhi = dyn_cast(Usr)) { BasicBlock *DominatedBlock = UsrPhi->getIncomingBlock(U); if (!DT.dominates(DominatingBlock, DominatedBlock)) -- 2.50.1