[C++20] [Modules] Allow -fmodule-file=<module-name>=<BMI-Path> for implementation...
authorChuanqi Xu <yedeng.yd@linux.alibaba.com>
Wed, 8 Feb 2023 08:24:39 +0000 (16:24 +0800)
committerChuanqi Xu <yedeng.yd@linux.alibaba.com>
Wed, 8 Feb 2023 08:45:00 +0000 (16:45 +0800)
commit1782e8f9e882e8f4fb59968ff555c8c93827ea02
tree6d412b04c388e84cbba292e6d414ff39536c1369
parent6d14b11018b4dc89692daee01ab0b5d9fa93ad0f
[C++20] [Modules] Allow -fmodule-file=<module-name>=<BMI-Path> for implementation unit and document the behavior

Close https://github.com/llvm/llvm-project/issues/57293.

Previsouly we can't use `-fmodule-file=<module-name>=<BMI-Path>` for
implementation units, it is a bug. Also the behavior of the above option
is not tested nor documented for C++20 Modules. This patch addresses the
2 problems.
clang/docs/StandardCPlusPlusModules.rst
clang/lib/Frontend/CompilerInstance.cpp
clang/lib/Sema/SemaModule.cpp
clang/test/CXX/modules-ts/basic/basic.link/module-declaration.cpp
clang/test/CXX/modules-ts/dcl.dcl/dcl.module/p2.cpp
clang/test/Modules/cxx20-impl-module-conditionally-load.cppm [new file with mode: 0644]
clang/test/Modules/cxx20-named-conditionally-load.cppm [new file with mode: 0644]