Temporarily disable clearing of insert point (to indicate unreachable
code) when calling noreturn functions; general expression emission
isn't ready to do the right thing in all cases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65473 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp
index 8f4367c..93f4ebe 100644
--- a/lib/CodeGen/CGCall.cpp
+++ b/lib/CodeGen/CGCall.cpp
@@ -1787,6 +1787,11 @@
Builder.CreateUnreachable();
Builder.ClearInsertionPoint();
+ // FIXME: For now, emit a dummy basic block because expr
+ // emitters in generally are not ready to handle emitting
+ // expressions at unreachable points.
+ EnsureInsertPoint();
+
// Return a reasonable RValue.
return GetUndefRValue(RetTy);
}