r326469 - Driver: hoist `-fno-rtti-data` to a driver flag

Saleem Abdulrasool via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 1 11:13:43 PST 2018


Author: compnerd
Date: Thu Mar  1 11:13:43 2018
New Revision: 326469

URL: http://llvm.org/viewvc/llvm-project?rev=326469&view=rev
Log:
Driver: hoist `-fno-rtti-data` to a driver flag

This is needed for building with the GNU driver (`clang++`) when
targeting Windows and using msvcprt.  This flag is the equivalent of
`/GR-`.

Added:
    cfe/trunk/test/Driver/fno-rtti-data.cpp
Modified:
    cfe/trunk/include/clang/Driver/CC1Options.td
    cfe/trunk/include/clang/Driver/Options.td

Modified: cfe/trunk/include/clang/Driver/CC1Options.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/CC1Options.td?rev=326469&r1=326468&r2=326469&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/CC1Options.td (original)
+++ cfe/trunk/include/clang/Driver/CC1Options.td Thu Mar  1 11:13:43 2018
@@ -707,8 +707,6 @@ def fobjc_subscripting_legacy_runtime :
   HelpText<"Allow Objective-C array and dictionary subscripting in legacy runtime">;
 def vtordisp_mode_EQ : Joined<["-"], "vtordisp-mode=">,
   HelpText<"Control vtordisp placement on win32 targets">;
-def fno_rtti_data : Flag<["-"], "fno-rtti-data">,
-  HelpText<"Control emission of RTTI data">;
 def fnative_half_type: Flag<["-"], "fnative-half-type">,
   HelpText<"Use the native half type for __fp16 instead of promoting to float">;
 def fnative_half_arguments_and_returns : Flag<["-"], "fnative-half-arguments-and-returns">,

Modified: cfe/trunk/include/clang/Driver/Options.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Options.td?rev=326469&r1=326468&r2=326469&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/Options.td (original)
+++ cfe/trunk/include/clang/Driver/Options.td Thu Mar  1 11:13:43 2018
@@ -1315,6 +1315,8 @@ def fno_operator_names : Flag<["-"], "fn
 def fno_pascal_strings : Flag<["-"], "fno-pascal-strings">, Group<f_Group>;
 def fno_rtti : Flag<["-"], "fno-rtti">, Group<f_Group>, Flags<[CC1Option]>,
   HelpText<"Disable generation of rtti information">;
+def fno_rtti_data : Flag<["-"], "fno-rtti-data">, Group<f_Group>, Flags<[CC1Option]>,
+  HelpText<"Control emission of RTTI data">;
 def fno_short_enums : Flag<["-"], "fno-short-enums">, Group<f_Group>;
 def fno_show_column : Flag<["-"], "fno-show-column">, Group<f_Group>, Flags<[CC1Option]>,
   HelpText<"Do not include column number on diagnostics">;

Added: cfe/trunk/test/Driver/fno-rtti-data.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/fno-rtti-data.cpp?rev=326469&view=auto
==============================================================================
--- cfe/trunk/test/Driver/fno-rtti-data.cpp (added)
+++ cfe/trunk/test/Driver/fno-rtti-data.cpp Thu Mar  1 11:13:43 2018
@@ -0,0 +1,2 @@
+// RUN: %clang -### -fno-rtti-data %s 2>&1 | FileCheck %s
+// CHECK: -fno-rtti-data




More information about the cfe-commits mailing list