aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGCall.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/CGCall.cpp')
-rw-r--r--lib/CodeGen/CGCall.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp
index 8f4367c858..93f4ebe945 100644
--- a/lib/CodeGen/CGCall.cpp
+++ b/lib/CodeGen/CGCall.cpp
@@ -1787,6 +1787,11 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo,
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);
}