MemorySSAUpdater::applyInsertUpdates - silence static analyzer dyn_cast<MemoryAccess> null dereference warning. NFCI.

The static analyzer is warning about a potential null dereference, but we should be able to use cast<MemoryAccess> directly and if not assert will fire for us.

llvm-svn: 373467
This commit is contained in:
Simon Pilgrim 2019-10-02 13:09:12 +00:00
parent 65e1150988
commit b635964abc
1 changed files with 1 additions and 1 deletions

View File

@ -1082,7 +1082,7 @@ void MemorySSAUpdater::applyInsertUpdates(ArrayRef<CFGUpdate> Updates,
for (; UI != E;) {
Use &U = *UI;
++UI;
MemoryAccess *Usr = dyn_cast<MemoryAccess>(U.getUser());
MemoryAccess *Usr = cast<MemoryAccess>(U.getUser());
if (MemoryPhi *UsrPhi = dyn_cast<MemoryPhi>(Usr)) {
BasicBlock *DominatedBlock = UsrPhi->getIncomingBlock(U);
if (!DT.dominates(DominatingBlock, DominatedBlock))