[IRGen][DebugInfo] Emit declarations for CFunctionPointer reps #75920
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 forCFunctionPointer
fixes this.According to the comments,
CFunctionPointer
is nearly identical toCXXMethod
, so I figured it was safe to add here.swift/include/swift/AST/ExtInfo.h
Lines 258 to 261 in 795bfb9
Resolves #74583