mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[AST] Treat platform modules as non-user
Modules defined within the SDK are considered non-user modules, extend this to any module found within the parent platform directory if there is one. This ensures we include modules such as XCTest and Testing. rdar://131854240
This commit is contained in:
@@ -380,6 +380,8 @@ private:
|
||||
|
||||
std::optional<StringRef> SysRoot = std::nullopt;
|
||||
|
||||
mutable std::optional<std::string> SDKPlatformPath = std::nullopt;
|
||||
|
||||
public:
|
||||
StringRef getSDKPath() const { return SDKPath; }
|
||||
|
||||
@@ -398,6 +400,12 @@ public:
|
||||
Lookup.searchPathsDidChange();
|
||||
}
|
||||
|
||||
/// Retrieves the corresponding parent platform path for the SDK, or
|
||||
/// \c nullopt if there isn't one.
|
||||
/// NOTE: This computes and caches the result, and as such will not respect
|
||||
/// a different FileSystem being passed later.
|
||||
std::optional<StringRef> getSDKPlatformPath(llvm::vfs::FileSystem *FS) const;
|
||||
|
||||
std::optional<StringRef> getWinSDKRoot() const { return WinSDKRoot; }
|
||||
void setWinSDKRoot(StringRef root) {
|
||||
WinSDKRoot = root;
|
||||
|
||||
Reference in New Issue
Block a user