From 5220c87fff0741a0f63085b53789aff7a88f9527 Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Thu, 1 Mar 2018 19:13:43 +0000 Subject: [PATCH] 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-`. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@326469 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Driver/CC1Options.td | 2 -- include/clang/Driver/Options.td | 2 ++ test/Driver/fno-rtti-data.cpp | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 test/Driver/fno-rtti-data.cpp diff --git a/include/clang/Driver/CC1Options.td b/include/clang/Driver/CC1Options.td index f8672188d2..97c996d23f 100644 --- a/include/clang/Driver/CC1Options.td +++ b/include/clang/Driver/CC1Options.td @@ -707,8 +707,6 @@ def fobjc_subscripting_legacy_runtime : Flag<["-"], "fobjc-subscripting-legacy-r 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">, diff --git a/include/clang/Driver/Options.td b/include/clang/Driver/Options.td index 3aadfcbde6..f8ef5a210d 100644 --- a/include/clang/Driver/Options.td +++ b/include/clang/Driver/Options.td @@ -1315,6 +1315,8 @@ def fno_operator_names : Flag<["-"], "fno-operator-names">, Group, def fno_pascal_strings : Flag<["-"], "fno-pascal-strings">, Group; def fno_rtti : Flag<["-"], "fno-rtti">, Group, Flags<[CC1Option]>, HelpText<"Disable generation of rtti information">; +def fno_rtti_data : Flag<["-"], "fno-rtti-data">, Group, Flags<[CC1Option]>, + HelpText<"Control emission of RTTI data">; def fno_short_enums : Flag<["-"], "fno-short-enums">, Group; def fno_show_column : Flag<["-"], "fno-show-column">, Group, Flags<[CC1Option]>, HelpText<"Do not include column number on diagnostics">; diff --git a/test/Driver/fno-rtti-data.cpp b/test/Driver/fno-rtti-data.cpp new file mode 100644 index 0000000000..cc2d5b68a1 --- /dev/null +++ b/test/Driver/fno-rtti-data.cpp @@ -0,0 +1,2 @@ +// RUN: %clang -### -fno-rtti-data %s 2>&1 | FileCheck %s +// CHECK: -fno-rtti-data -- 2.40.0