SEH: Don't jump to an unreachable continuation block
If both the __try and __except blocks do not return, we want to delete
the continuation block as unreachable instead.
llvm-svn: 227627
diff --git a/clang/lib/CodeGen/CGException.cpp b/clang/lib/CodeGen/CGException.cpp
index 68764e9..9f886eb 100644
--- a/clang/lib/CodeGen/CGException.cpp
+++ b/clang/lib/CodeGen/CGException.cpp
@@ -1899,7 +1899,8 @@
// Emit the __except body.
EmitStmt(Except->getBlock());
- Builder.CreateBr(ContBB);
+ if (HaveInsertPoint())
+ Builder.CreateBr(ContBB);
EmitBlock(ContBB);
}