File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -4988,10 +4988,10 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo,
4988
4988
4989
4989
// 4. Finish the call.
4990
4990
4991
- // If the call doesn't return, finish the basic block and clear the
4991
+ // If the call doesn't return for non-sycl devices , finish the basic block and clear the
4992
4992
// insertion point; this allows the rest of IRGen to discard
4993
4993
// unreachable code.
4994
- if (CI->doesNotReturn ()) {
4994
+ if (CI->doesNotReturn () && ! getLangOpts (). SYCLIsDevice ) {
4995
4995
if (UnusedReturnSizePtr)
4996
4996
PopCleanupBlock ();
4997
4997
@@ -5017,9 +5017,8 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo,
5017
5017
EmitNounwindRuntimeCall (Fn);
5018
5018
}
5019
5019
}
5020
- // Emit unreachable only for non-sycl devices
5021
- if (!getLangOpts ().SYCLIsDevice )
5022
- EmitUnreachable (Loc);
5020
+
5021
+ EmitUnreachable (Loc);
5023
5022
Builder.ClearInsertionPoint ();
5024
5023
5025
5024
// FIXME: For now, emit a dummy basic block because expr emitters in
You can’t perform that action at this time.
0 commit comments