Skip to content

[IRGen][DebugInfo] Emit declarations for CFunctionPointer reps #75920

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

Merged
merged 2 commits into from
Aug 21, 2024

Conversation

ellishg
Copy link
Contributor

@ellishg ellishg commented Aug 15, 2024

There is a verification pass to check that some DISubprograms have declarations.
swiftlang/llvm-project@1e608f9#diff-7f0021f2c6cd747015d1e98778f5d97944fd1ca5448e5750b3b1b637b0cf8323R1496-R1504

I suspect that 81953ef and later e0e7a08 aim to fix some of these cases. In the test case, I've managed to find a compiler-generated DISubprogram that fails this verification and I've found that adding a case for CFunctionPointer fixes this.

According to the comments, CFunctionPointer is nearly identical to CXXMethod, so I figured it was safe to add here.

/// A C++ method that takes a "this" argument (not a static C++ method or
/// constructor). Except for
/// handling the "this" argument, has the same behavior as "CFunctionPointer".
CXXMethod,

Resolves #74583

@ellishg ellishg requested a review from adrian-prantl as a code owner August 15, 2024 23:46
@ellishg
Copy link
Contributor Author

ellishg commented Aug 20, 2024

Friendly ping @adrian-prantl @augusto2112 @dianqk

@ellishg
Copy link
Contributor Author

ellishg commented Aug 21, 2024

Thanks for the accept! I believe I don't have access to test/merge. Can someone do that for me?

@NuriAmari
Copy link
Contributor

@swift-ci Please test

@augusto2112
Copy link
Contributor

@swift-ci smoke test

@augusto2112 augusto2112 merged commit 1b2c13b into swiftlang:main Aug 21, 2024
5 checks passed
@augusto2112
Copy link
Contributor

@ellishg thanks for fixing this!

@ellishg ellishg deleted the debug-info-verify branch August 21, 2024 17:12
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.

Swift produces invalid debug IR
5 participants