SIL: create hop_to_executor instructions with "auto-generated" debug locations.

Those instructions should not be "visible" for debugging and for diagnostic messages.

Fixes a wrong "unreachable code" warning.

https://bugs.swift.org/browse/SR-14873
rdar://80237870
This commit is contained in:
Erik Eckstein
2021-08-26 18:55:16 +02:00
parent 6d5b0c75ac
commit ce7358d35d
5 changed files with 29 additions and 5 deletions

View File

@@ -818,7 +818,7 @@ static void injectHopToExecutorAfter(SILLocation loc,
if (needsBorrow)
actor = b.createBeginBorrow(loc, actor);
b.createHopToExecutor(loc, actor, /*mandatory=*/false);
b.createHopToExecutor(loc.asAutoGenerated(), actor, /*mandatory=*/false);
if (needsBorrow)
b.createEndBorrow(loc, actor);