[clang] [C++20] [Modules] Introduce -fexperimental-modules-reduced-bmi (PR #85050)

Chuanqi Xu via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 1 19:00:53 PDT 2024


================
@@ -193,6 +193,20 @@ DwarfFissionKind getDebugFissionKind(const Driver &D,
                                      const llvm::opt::ArgList &Args,
                                      llvm::opt::Arg *&Arg);
 
+// Calculate the output path of the module file when compiling a module unit
+// with the `-fmodule-output` option or `-fmodule-output=` option specified.
+// The behavior is:
+// - If `-fmodule-output=` is specfied, then the module file is
+//   writing to the value.
+// - Otherwise if the output object file of the module unit is specified, the
+// output path
+//   of the module file should be the same with the output object file except
+//   the corresponding suffix. This requires both `-o` and `-c` are specified.
+// - Otherwise, the output path of the module file will be the same with the
+//   input with the corresponding suffix.
+llvm::SmallString<256>
+getCXX20NamedModuleOutputPath(const llvm::opt::ArgList &Args,
----------------
ChuanqiXu9 wrote:

Done in https://github.com/llvm/llvm-project/commit/21f85e230056172cffcaec76352e5a2019b54b86

https://github.com/llvm/llvm-project/pull/85050


More information about the cfe-commits mailing list