[PATCH] D152405: [WIP][clang] Add experimental option to omit the RTTI component from the vtable when -fno-rtti is used

Petr Hosek via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 12 23:01:31 PDT 2023


phosek added inline comments.


================
Comment at: clang/include/clang/Driver/Options.td:2249-2256
+def fexperimental_omit_rtti_component :
+  Flag<["-"], "fexperimental-omit-rtti-component">,
+  Group<f_clang_Group>, Flags<[CC1Option]>,
+  HelpText<"Omit the RTTI component from virtual tables">;
+def fno_experimental_omit_rtti_component :
+  Flag<["-"], "fno-experimental-omit-rtti-component">,
+  Group<f_clang_Group>, Flags<[CC1Option]>,
----------------
Can you use `BoolFOption` to simplify the definition?


================
Comment at: clang/include/clang/Driver/Options.td:2250
+def fexperimental_omit_rtti_component :
+  Flag<["-"], "fexperimental-omit-rtti-component">,
+  Group<f_clang_Group>, Flags<[CC1Option]>,
----------------
I think the name should signal that this is related to vtables (otherwise users might be wondering what "component" is this referring to).

We could use `-fexperimental-omit-vtable-rtti-component` but that's quite a mouthful, maybe `-fexperimental-omit-vtable-rtti` would suffice?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D152405/new/

https://reviews.llvm.org/D152405



More information about the cfe-commits mailing list