Fix typo in LoopSimplifyCFG
authorFiona Glaser <escha@apple.com>
Fri, 29 Jan 2016 23:12:52 +0000 (23:12 +0000)
committerFiona Glaser <escha@apple.com>
Fri, 29 Jan 2016 23:12:52 +0000 (23:12 +0000)
llvm-svn: 259261

llvm/lib/Transforms/Scalar/LoopSimplifyCFG.cpp

index 8e066ac..b5fdae9 100644 (file)
@@ -80,7 +80,7 @@ static bool simplifyLoopCFG(Loop *L, DominatorTree *DT, LoopInfo *LI) {
   for (auto &Block : Blocks) {
     // Attempt to merge blocks in the trivial case. Don't modify blocks which
     // belong to other loops.
-    BasicBlock *Succ = cast<BasicBlock>(Block);
+    BasicBlock *Succ = cast_or_null<BasicBlock>(Block);
     if (!Succ)
       continue;