Merge pull request #62185 from xymus/improve-rmodule-loading

Improve `-Rmodule-loading` to show both the path to the source and to the cached file actually loaded
This commit is contained in:
Alexis Laferrière
2022-11-28 14:25:15 -08:00
committed by GitHub
18 changed files with 144 additions and 35 deletions

View File

@@ -836,6 +836,17 @@ public:
/// string if this is not applicable.
StringRef getModuleFilename() const;
/// Get the path to the file defining this module, what we consider the
/// source of truth about the module. Usually a swiftinterface file for a
/// resilient module, a swiftmodule for a non-resilient module, or the
/// modulemap for a clang module. Returns an empty string if not applicable.
StringRef getModuleSourceFilename() const;
/// Get the path to the file loaded by the compiler. Usually the binary
/// swiftmodule file or a pcm in the cache. Returns an empty string if not
/// applicable.
StringRef getModuleLoadedFilename() const;
/// \returns true if this module is the "swift" standard library module.
bool isStdlibModule() const;