Skip to content

Commit b8b13d8

Browse files
Merge pull request #81808 from nate-chandler/bug/20250528/1
[IRGen] This ArtificialLoc requires a debug scope.
2 parents ce0ad87 + 94e7582 commit b8b13d8

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lib/IRGen/GenCall.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5023,8 +5023,11 @@ static void emitRetconCoroutineEntry(
50235023
for (auto *arg : finalArguments) {
50245024
arguments.push_back(arg);
50255025
}
5026-
ArtificialLocation Loc(IGF.getDebugScope(), IGF.IGM.DebugInfo.get(),
5027-
IGF.Builder);
5026+
std::optional<ArtificialLocation> Loc;
5027+
if (IGF.getDebugScope()) {
5028+
Loc.emplace(IGF.getDebugScope(), IGF.IGM.DebugInfo.get(),
5029+
IGF.Builder);
5030+
}
50285031
llvm::Value *id = IGF.Builder.CreateIntrinsicCall(idIntrinsic, arguments);
50295032

50305033
// Call 'llvm.coro.begin', just for consistency with the normal pattern.

0 commit comments

Comments
 (0)