diff options
author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2019-10-02 13:09:12 +0000 |
---|---|---|
committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2019-10-02 13:09:12 +0000 |
commit | b635964abc780fcc3a1967961737bb8ee0a78541 (patch) | |
tree | 258bd7acf94cb33899b06b8ec9ad675d1c5bc1f3 /llvm/lib/Analysis | |
parent | 65e115098821925055d6e78312862bf2513f8996 (diff) | |
download | bcm5719-llvm-b635964abc780fcc3a1967961737bb8ee0a78541.tar.gz bcm5719-llvm-b635964abc780fcc3a1967961737bb8ee0a78541.zip |
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
Diffstat (limited to 'llvm/lib/Analysis')
-rw-r--r-- | llvm/lib/Analysis/MemorySSAUpdater.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/MemorySSAUpdater.cpp b/llvm/lib/Analysis/MemorySSAUpdater.cpp index e0b27f1d501..6018968c199 100644 --- a/llvm/lib/Analysis/MemorySSAUpdater.cpp +++ b/llvm/lib/Analysis/MemorySSAUpdater.cpp @@ -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)) |