[clang] [C++20] [Modules] Introduce -fexperimental-modules-reduced-bmi (PR #85050)
Matheus Izvekov via cfe-commits
cfe-commits at lists.llvm.org
Sun Apr 14 15:53:38 PDT 2024
================
@@ -4045,6 +4045,24 @@ static bool RenderModulesOptions(Compilation &C, const Driver &D,
// module fragment.
CmdArgs.push_back("-fskip-odr-check-in-gmf");
+ if (Args.hasArg(options::OPT_modules_reduced_bmi) &&
+ (Input.getType() == driver::types::TY_CXXModule ||
+ Input.getType() == driver::types::TY_PP_CXXModule)) {
+ CmdArgs.push_back("-fexperimental-modules-reduced-bmi");
+
+ if (Args.hasArg(options::OPT_fmodule_output_EQ))
+ Args.AddLastArg(CmdArgs, options::OPT_fmodule_output_EQ);
+ else
+ CmdArgs.push_back(Args.MakeArgString(
+ "-fmodule-output=" +
+ getCXX20NamedModuleOutputPath(Args, Input.getBaseInput())));
----------------
mizvekov wrote:
Would it be reasonable to push two separate arguments, instead of concatenating them?
https://github.com/llvm/llvm-project/pull/85050
More information about the cfe-commits
mailing list