[C++20] [Modules] Emit Macro Definition in -module-file-info action
authorChuanqi Xu <yedeng.yd@linux.alibaba.com>
Fri, 11 Nov 2022 08:39:12 +0000 (16:39 +0800)
committerChuanqi Xu <yedeng.yd@linux.alibaba.com>
Mon, 14 Nov 2022 05:28:26 +0000 (13:28 +0800)
commit360c5fe54c0758c73bf85453fd2913f371adc7d5
tree41afe001f141722af4c3d93b660c3d14f0f5adde
parentf7f917a7645833822fa623f97e330a1b74951197
[C++20] [Modules] Emit Macro Definition in -module-file-info action

It is helpful to know whih macro definition is emitted in the module
file without openning it directly. And this is not easy to be tested
with the lit test. So this patch add the facility to emit macro
definitions in `-module-file-info` action. And this should be innnocent
for every other cases.
clang/lib/Frontend/FrontendActions.cpp
clang/test/Modules/cxx20-module-file-info-macros.cpp [new file with mode: 0644]