Skip to content

[coro] Preserve scope line for compiler generated functions #3022

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

kastiglione
Copy link

Coro-split functions with an active suspend point have their scope line set to
the line of the suspend point. However for compiler generated functions, this
results in debug info with unconventional results: a file named
<compiler-generated> with a non-zero line number. The convention for
<compiler-generated> is that the line number is zero.

This change propagates the scope line only for non-compiler generated
functions.

Differential Revision: https://reviews.llvm.org/D102412

(cherry picked from commit 60ce8ba)

@kastiglione
Copy link
Author

@swift-ci test macOS Platform

Coro-split functions with an active suspend point have their scope line set to
the line of the suspend point. However for compiler generated functions, this
results in debug info with unconventional results: a file named
`<compiler-generated>` with a non-zero line number. The convention for
`<compiler-generated>` is that the line number is zero.

This change propagates the scope line only for non-compiler generated
functions.

Differential Revision: https://reviews.llvm.org/D102412

(cherry picked from commit 60ce8ba)
@kastiglione kastiglione force-pushed the coro-Preserve-scope-line-for-compiler-generated-functions branch from 410b34d to a516671 Compare June 4, 2021 00:42
@kastiglione
Copy link
Author

@swift-ci test macOS platform

@kastiglione kastiglione merged commit d9235fa into apple/stable/20210107 Jun 4, 2021
@kastiglione kastiglione deleted the coro-Preserve-scope-line-for-compiler-generated-functions branch June 4, 2021 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant