Skip to content

Commit a0ec93e

Browse files
committed
Rename to -fexperimental-modules-reduced-bmi
1 parent 7027f0e commit a0ec93e

File tree

5 files changed

+20
-20
lines changed

5 files changed

+20
-20
lines changed

clang/include/clang/Driver/Options.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3031,7 +3031,7 @@ defm skip_odr_check_in_gmf : BoolOption<"f", "skip-odr-check-in-gmf",
30313031
"Perform ODR checks for decls in the global module fragment.">>,
30323032
Group<f_Group>;
30333033

3034-
def modules_reduced_bmi : Flag<["-"], "fmodules-reduced-bmi">,
3034+
def modules_reduced_bmi : Flag<["-"], "fexperimental-modules-reduced-bmi">,
30353035
Group<f_Group>, Visibility<[ClangOption, CC1Option]>,
30363036
HelpText<"Generate the reduced BMI">,
30373037
MarshallingInfoFlag<FrontendOpts<"GenReducedBMI">>;

clang/lib/Driver/Driver.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4749,10 +4749,10 @@ Action *Driver::ConstructPhaseAction(
47494749
if (Args.hasArg(options::OPT_extract_api))
47504750
return C.MakeAction<ExtractAPIJobAction>(Input, types::TY_API_INFO);
47514751

4752-
// With '-fmodules-reduced-bmi', we don't want to run the precompile phase
4753-
// unless the user specified '--precompile'. In the case the '--precompile'
4754-
// flag is enabled, we will try to emit the reduced BMI as a by product
4755-
// in GenerateModuleInterfaceAction.
4752+
// With 'fexperimental-modules-reduced-bmi', we don't want to run the
4753+
// precompile phase unless the user specified '--precompile'. In the case
4754+
// the '--precompile' flag is enabled, we will try to emit the reduced BMI
4755+
// as a by product in GenerateModuleInterfaceAction.
47564756
if (Args.hasArg(options::OPT_modules_reduced_bmi) &&
47574757
!Args.getLastArg(options::OPT__precompile))
47584758
return Input;

clang/lib/Driver/ToolChains/Clang.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4045,13 +4045,13 @@ static bool RenderModulesOptions(Compilation &C, const Driver &D,
40454045
// module fragment.
40464046
CmdArgs.push_back("-fskip-odr-check-in-gmf");
40474047

4048-
// Noop if we see '-fmodules-reduced-bmi' with other translation units than module
4049-
// units. This is more user friendly to allow end uers to enable this feature
4050-
// without asking for help from build systems.
4048+
// Noop if we see '-modules-reduced-bmi' with other translation units than
4049+
// module units. This is more user friendly to allow end uers to enable this
4050+
// feature without asking for help from build systems.
40514051
if (Args.hasArg(options::OPT_modules_reduced_bmi) &&
40524052
(Input.getType() == driver::types::TY_CXXModule ||
40534053
Input.getType() == driver::types::TY_PP_CXXModule)) {
4054-
CmdArgs.push_back("-fmodules-reduced-bmi");
4054+
CmdArgs.push_back("-fexperimental-modules-reduced-bmi");
40554055

40564056
if (Args.hasArg(options::OPT_fmodule_output_EQ))
40574057
Args.AddLastArg(CmdArgs, options::OPT_fmodule_output_EQ);

clang/test/Driver/module-fgen-reduced-bmi.cppm

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,33 +9,33 @@
99
// RUN: rm -rf %t && split-file %s %t && cd %t
1010
//
1111
// RUN: %clang -std=c++20 Hello.cppm -fmodule-output=Hello.pcm \
12-
// RUN: -fmodules-reduced-bmi -c -o Hello.o -### 2>&1 | FileCheck Hello.cppm
12+
// RUN: -fexperimental-modules-reduced-bmi -c -o Hello.o -### 2>&1 | FileCheck Hello.cppm
1313
//
1414
// RUN: %clang -std=c++20 Hello.cppm \
15-
// RUN: -fmodules-reduced-bmi -c -o Hello.o -### 2>&1 | \
15+
// RUN: -fexperimental-modules-reduced-bmi -c -o Hello.o -### 2>&1 | \
1616
// RUN: FileCheck Hello.cppm --check-prefix=CHECK-UNSPECIFIED
1717
//
1818
// RUN: %clang -std=c++20 Hello.cppm \
19-
// RUN: -fmodules-reduced-bmi -c -### 2>&1 | \
19+
// RUN: -fexperimental-modules-reduced-bmi -c -### 2>&1 | \
2020
// RUN: FileCheck Hello.cppm --check-prefix=CHECK-NO-O
2121
//
2222
// RUN: %clang -std=c++20 Hello.cppm \
23-
// RUN: -fmodules-reduced-bmi -c -o AnotherName.o -### 2>&1 | \
23+
// RUN: -fexperimental-modules-reduced-bmi -c -o AnotherName.o -### 2>&1 | \
2424
// RUN: FileCheck Hello.cppm --check-prefix=CHECK-ANOTHER-NAME
2525
//
26-
// RUN: %clang -std=c++20 Hello.cppm --precompile -fmodules-reduced-bmi \
26+
// RUN: %clang -std=c++20 Hello.cppm --precompile -fexperimental-modules-reduced-bmi \
2727
// RUN: -o Hello.full.pcm -### 2>&1 | FileCheck Hello.cppm \
2828
// RUN: --check-prefix=CHECK-EMIT-MODULE-INTERFACE
2929
//
30-
// RUN: %clang -std=c++20 Hello.cc -fmodules-reduced-bmi -Wall -Werror \
30+
// RUN: %clang -std=c++20 Hello.cc -fexperimental-modules-reduced-bmi -Wall -Werror \
3131
// RUN: -c -o Hello.o -### 2>&1 | FileCheck Hello.cc
3232

3333
//--- Hello.cppm
3434
export module Hello;
3535

3636
// Test that we won't generate the emit-module-interface as 2 phase compilation model.
3737
// CHECK-NOT: -emit-module-interface
38-
// CHECK: "-fmodules-reduced-bmi"
38+
// CHECK: "-fexperimental-modules-reduced-bmi"
3939

4040
// CHECK-UNSPECIFIED: -fmodule-output=Hello.pcm
4141

@@ -48,4 +48,4 @@ export module Hello;
4848

4949
//--- Hello.cc
5050

51-
// CHECK-NOT: "-fmodules-reduced-bmi"
51+
// CHECK-NOT: "-fexperimental-modules-reduced-bmi"

clang/test/Modules/modules-reduced-bmi.cppm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@
33
// RUN: split-file %s %t
44
//
55
// RUN: %clang_cc1 -std=c++20 %t/a.cppm -emit-reduced-module-interface -o %t/a.reduced.pcm
6-
// RUN: %clang_cc1 -std=c++20 %t/a.cppm -fmodules-reduced-bmi -fmodule-output=%t/a.pcm \
6+
// RUN: %clang_cc1 -std=c++20 %t/a.cppm -fexperimental-modules-reduced-bmi -fmodule-output=%t/a.pcm \
77
// RUN: -S -emit-llvm -o %t/a.ll
88
//
9-
// Test that the generated BMI from `-fmodules-reduced-bmi -fmodule-output=` is same with
9+
// Test that the generated BMI from `-fexperimental-modules-reduced-bmi -fmodule-output=` is same with
1010
// `-emit-reduced-module-interface`.
1111
// RUN: diff %t/a.reduced.pcm %t/a.pcm
1212
//
1313
// Test that we can consume the produced BMI correctly.
1414
// RUN: %clang_cc1 -std=c++20 %t/b.cppm -fmodule-file=a=%t/a.pcm -fsyntax-only -verify
1515
//
1616
// RUN: rm -f %t/a.pcm
17-
// RUN: %clang_cc1 -std=c++20 %t/a.cppm -fmodules-reduced-bmi -fmodule-output=%t/a.pcm \
17+
// RUN: %clang_cc1 -std=c++20 %t/a.cppm -fexperimental-modules-reduced-bmi -fmodule-output=%t/a.pcm \
1818
// RUN: -emit-module-interface -o %t/a.full.pcm
1919
// RUN: diff %t/a.reduced.pcm %t/a.pcm
2020
// RUN: not diff %t/a.pcm %t/a.full.pcm

0 commit comments

Comments
 (0)