Files
swift-mirror/lib/Frontend/ModuleInterfaceLoader.cpp
Artem Chikin a0b5dd4241 Separate parsing out Swift and Clang modules from the explicit module map
Since https://github.com/apple/swift/pull/63178 added support for Clang modules in the explicit module map, it is possible for there to be multiple modules with the same name: a Swift module and a Clang module. The current parsing logic just overwrites the corresponding entry module in a hashmap so we always only preserved the module that comes last, with the same name.

This change separates the parsing of the modulemap JSON file to produce a separate Swift module map and Clang module map. The Swift one is used by the 'ExplicitSwiftModuleLoader', as before, and the Clang one is only used to populate the ClangArgs with the requried -fmodule-... flags.
2023-02-17 09:03:53 -08:00

86 KiB