If llvm.dbg.region.end is disappearing then remove corresponding llvm.dbg.func.start also.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64278 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Transforms/Utils/SimplifyCFG.cpp b/lib/Transforms/Utils/SimplifyCFG.cpp
index b5d7423..86d4a75 100644
--- a/lib/Transforms/Utils/SimplifyCFG.cpp
+++ b/lib/Transforms/Utils/SimplifyCFG.cpp
@@ -1806,7 +1806,7 @@
         // If we eliminated all predecessors of the block, delete the block now.
         if (pred_begin(BB) == pred_end(BB))
           // We know there are no successors, so just nuke the block.
-          M->getBasicBlockList().erase(BB);
+          DeleteDeadBlock(BB);
 
         return true;
       }