From 98e961df163b24e88ddad578a11a39128d35be48 Mon Sep 17 00:00:00 2001 From: Jonathan Grynspan Date: Tue, 23 Sep 2025 12:54:44 -0400 Subject: [PATCH] Rename the new `_GUID` clang module to `_GUIDDef`. This PR changes the name of the clang module introduced in #83914 from `_GUID` to `_GUIDDef`. This change is necessary because the Windows SDK declares a type named `_GUID` and Swift gets confused when a module and a type have the same name. This confusion is the motivation for [SE-0491](https://github.com/swiftlang/swift-evolution/blob/main/proposals/0491-module-selectors.md), but we can't just wait for a fix because the new module is a source-breaking change and clients won't be able to adopt the proposed syntax for some time. --- stdlib/public/Platform/winsdk_shared.modulemap | 2 +- stdlib/public/Windows/WinSDK.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/stdlib/public/Platform/winsdk_shared.modulemap b/stdlib/public/Platform/winsdk_shared.modulemap index 598373d6b32e5..244460b92040b 100644 --- a/stdlib/public/Platform/winsdk_shared.modulemap +++ b/stdlib/public/Platform/winsdk_shared.modulemap @@ -10,7 +10,7 @@ // //===----------------------------------------------------------------------===// -module _GUID { +module _GUIDDef { header "guiddef.h" export * } diff --git a/stdlib/public/Windows/WinSDK.swift b/stdlib/public/Windows/WinSDK.swift index f2055d013c6a3..cfa0f2fdee6b5 100644 --- a/stdlib/public/Windows/WinSDK.swift +++ b/stdlib/public/Windows/WinSDK.swift @@ -11,7 +11,7 @@ //===----------------------------------------------------------------------===// @_exported import ucrt -@_exported import _GUID +@_exported import _GUIDDef @_exported import WinSDK // Clang module // WinBase.h