-
Notifications
You must be signed in to change notification settings - Fork 13.6k
[clang] Remove the experimental prefix from -fexperimental-relative-c++-abi-vtables #142845
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
@llvm/pr-subscribers-clang Author: None (PiJoules) ChangesThis actually creates an alias to the original flag omitting the experimental part. This has been in prod use for a while and isn't necessary. Full diff: https://github.com/llvm/llvm-project/pull/142845.diff 2 Files Affected:
diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td
index 5ca31c253ed8f..73c5424d4f0ae 100644
--- a/clang/include/clang/Driver/Options.td
+++ b/clang/include/clang/Driver/Options.td
@@ -2996,14 +2996,19 @@ defm fine_grained_bitfield_accesses : BoolOption<"f", "fine-grained-bitfield-acc
BothFlags<[], [ClangOption, CC1Option]>>,
Group<f_clang_Group>;
-def fexperimental_relative_cxx_abi_vtables :
- Flag<["-"], "fexperimental-relative-c++-abi-vtables">,
- Group<f_clang_Group>, Visibility<[ClangOption, CC1Option]>,
- HelpText<"Use the experimental C++ class ABI for classes with virtual tables">;
-def fno_experimental_relative_cxx_abi_vtables :
- Flag<["-"], "fno-experimental-relative-c++-abi-vtables">,
- Group<f_clang_Group>, Visibility<[ClangOption, CC1Option]>,
- HelpText<"Do not use the experimental C++ class ABI for classes with virtual tables">;
+defm experimental_relative_cxx_abi_vtables
+ : BoolFOption<
+ "experimental-relative-c++-abi-vtables",
+ LangOpts<"RelativeCXXABIVTables">, DefaultFalse,
+ PosFlag<SetTrue, [], [ClangOption, CC1Option], "Use ">,
+ NegFlag<SetFalse, [], [ClangOption, CC1Option], "Do not use ">,
+ BothFlags<[], [ClangOption, CC1Option],
+ " the experimental C++ class ABI for classes with virtual "
+ "tables">>;
+def : Flag<["-"], "frelative-c++-abi-vtables">,
+ Alias<fexperimental_relative_cxx_abi_vtables>;
+def : Flag<["-"], "fno-relative-c++-abi-vtables">,
+ Alias<fno_experimental_relative_cxx_abi_vtables>;
defm experimental_omit_vtable_rtti : BoolFOption<"experimental-omit-vtable-rtti",
LangOpts<"OmitVTableRTTI">, DefaultFalse,
diff --git a/clang/test/Driver/relative-vtables-flag.cpp b/clang/test/Driver/relative-vtables-flag.cpp
index 1253809e1d428..2a38679135459 100644
--- a/clang/test/Driver/relative-vtables-flag.cpp
+++ b/clang/test/Driver/relative-vtables-flag.cpp
@@ -2,6 +2,8 @@
// RUN: %clangxx --target=aarch64-unknown-fuchsia -fno-experimental-relative-c++-abi-vtables -c %s -### 2>&1 | FileCheck %s --check-prefix=NO-RV
// RUN: %clangxx --target=aarch64-unknown-fuchsia -c %s -### 2>&1 | FileCheck %s --check-prefix=NO-RV
// RUN: %clangxx --target=aarch64-unknown-linux-gnu -c %s -### 2>&1 | FileCheck %s --check-prefix=NO-RV
+// RUN: %clangxx --target=aarch64-unknown-fuchsia -frelative-c++-abi-vtables -c %s -### 2>&1 | FileCheck %s --check-prefix=RV
+// RUN: %clangxx --target=aarch64-unknown-fuchsia -fno-relative-c++-abi-vtables -c %s -### 2>&1 | FileCheck %s --check-prefix=NO-RV
// RV: "-fexperimental-relative-c++-abi-vtables"
// NO-RV-NOT: "-fexperimental-relative-c++-abi-vtables"
|
@llvm/pr-subscribers-clang-driver Author: None (PiJoules) ChangesThis actually creates an alias to the original flag omitting the experimental part. This has been in prod use for a while and isn't necessary. Full diff: https://github.com/llvm/llvm-project/pull/142845.diff 2 Files Affected:
diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td
index 5ca31c253ed8f..73c5424d4f0ae 100644
--- a/clang/include/clang/Driver/Options.td
+++ b/clang/include/clang/Driver/Options.td
@@ -2996,14 +2996,19 @@ defm fine_grained_bitfield_accesses : BoolOption<"f", "fine-grained-bitfield-acc
BothFlags<[], [ClangOption, CC1Option]>>,
Group<f_clang_Group>;
-def fexperimental_relative_cxx_abi_vtables :
- Flag<["-"], "fexperimental-relative-c++-abi-vtables">,
- Group<f_clang_Group>, Visibility<[ClangOption, CC1Option]>,
- HelpText<"Use the experimental C++ class ABI for classes with virtual tables">;
-def fno_experimental_relative_cxx_abi_vtables :
- Flag<["-"], "fno-experimental-relative-c++-abi-vtables">,
- Group<f_clang_Group>, Visibility<[ClangOption, CC1Option]>,
- HelpText<"Do not use the experimental C++ class ABI for classes with virtual tables">;
+defm experimental_relative_cxx_abi_vtables
+ : BoolFOption<
+ "experimental-relative-c++-abi-vtables",
+ LangOpts<"RelativeCXXABIVTables">, DefaultFalse,
+ PosFlag<SetTrue, [], [ClangOption, CC1Option], "Use ">,
+ NegFlag<SetFalse, [], [ClangOption, CC1Option], "Do not use ">,
+ BothFlags<[], [ClangOption, CC1Option],
+ " the experimental C++ class ABI for classes with virtual "
+ "tables">>;
+def : Flag<["-"], "frelative-c++-abi-vtables">,
+ Alias<fexperimental_relative_cxx_abi_vtables>;
+def : Flag<["-"], "fno-relative-c++-abi-vtables">,
+ Alias<fno_experimental_relative_cxx_abi_vtables>;
defm experimental_omit_vtable_rtti : BoolFOption<"experimental-omit-vtable-rtti",
LangOpts<"OmitVTableRTTI">, DefaultFalse,
diff --git a/clang/test/Driver/relative-vtables-flag.cpp b/clang/test/Driver/relative-vtables-flag.cpp
index 1253809e1d428..2a38679135459 100644
--- a/clang/test/Driver/relative-vtables-flag.cpp
+++ b/clang/test/Driver/relative-vtables-flag.cpp
@@ -2,6 +2,8 @@
// RUN: %clangxx --target=aarch64-unknown-fuchsia -fno-experimental-relative-c++-abi-vtables -c %s -### 2>&1 | FileCheck %s --check-prefix=NO-RV
// RUN: %clangxx --target=aarch64-unknown-fuchsia -c %s -### 2>&1 | FileCheck %s --check-prefix=NO-RV
// RUN: %clangxx --target=aarch64-unknown-linux-gnu -c %s -### 2>&1 | FileCheck %s --check-prefix=NO-RV
+// RUN: %clangxx --target=aarch64-unknown-fuchsia -frelative-c++-abi-vtables -c %s -### 2>&1 | FileCheck %s --check-prefix=RV
+// RUN: %clangxx --target=aarch64-unknown-fuchsia -fno-relative-c++-abi-vtables -c %s -### 2>&1 | FileCheck %s --check-prefix=NO-RV
// RV: "-fexperimental-relative-c++-abi-vtables"
// NO-RV-NOT: "-fexperimental-relative-c++-abi-vtables"
|
…++-abi-vtables This actually creates an alias to the original flag omitting the experimental part. This has been in prod use for a while and isn't necessary.
676b29c
to
7cf215d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes should come with a release note to let the users know this is no longer experimental.
That said, I think we're still missing something for this to no longer be experimental: documentation. I can't find any mention of this flag in LanguageExtensions.rst
and I think users would appreciate an explanation of why this feature should be used.
This actually creates an alias to the original flag omitting the experimental part. This has been in prod use for a while and isn't necessary.