Skip to content

Conversation

@hjyamauchi
Copy link
Contributor

@hjyamauchi hjyamauchi commented Jan 6, 2026

Predefined declarations (like _GUID) are special forward declarations inserted by Clang and aren't serialized into the pcm and their definition pointers aren't retained across serialization and deserialization, which causes this type not found error. Avoid putting non-defining predefined declarations into the swift lookup table when their definitions exist in the same module so that the definitions will be associated with the base name and avoid this error.

Issue: #85495

(cherry picked from commit be641d7)

@hjyamauchi
Copy link
Contributor Author

@swift-ci please test

Predefined declarations (like _GUID) are special forward declarations
inserted by Clang and aren't serialized into the pcm and their
definition pointers aren't retained across serialization and
deserialization, which causes this type not found error. Avoid putting
non-defining predefined declarations into the swift lookup table when
their definitions exist in the same module so that the definitions
will be associated with the base name and avoid this error.

Issue: swiftlang#85495

(cherry picked from commit be641d7)
@hjyamauchi
Copy link
Contributor Author

@swift-ci please test

@hjyamauchi hjyamauchi marked this pull request as ready for review January 7, 2026 05:54
@hjyamauchi hjyamauchi requested a review from a team as a code owner January 7, 2026 05:54
@hjyamauchi hjyamauchi requested a review from compnerd January 7, 2026 17:59
@hjyamauchi
Copy link
Contributor Author

Explanation: This fixes a long-standing _GUID type not found error on Windows when C++ interop is enabled
Scope: The _GUID type and the issue is specific to Windows
Issues: #85495
Original PRs: #85550
Risk: Low. The fix logic is limited to handling of (a limited number of special) predefined declarations that Clang registers.
Testing: The 6.3 CI
Reviewers: @compnerd

@hjyamauchi hjyamauchi merged commit 5f651da into swiftlang:release/6.3 Jan 8, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants