Make requested changes. http://reviews.llvm.org/D4474
Files: include/clang/Driver/Options.td test/Driver/clang_f_opts.c
Index: include/clang/Driver/Options.td =================================================================== --- include/clang/Driver/Options.td +++ include/clang/Driver/Options.td @@ -473,11 +473,11 @@ def ferror_limit_EQ : Joined<["-"], "ferror-limit=">, Group<f_Group>, Flags<[CoreOption]>; def fexceptions : Flag<["-"], "fexceptions">, Group<f_Group>, Flags<[CC1Option]>, HelpText<"Enable support for exception handling">; -def : Flag<["-"], "fexpensive-optimizations">, Group<clang_ignored_f_Group>; -def : Flag<["-"], "fno-expensive-optimizations">, Group<clang_ignored_f_Group>; +def : Flag<["-"], "fexpensive-optimizations">, Group<clang_ignored_gcc_optimization_f_Group>; +def : Flag<["-"], "fno-expensive-optimizations">, Group<clang_ignored_gcc_optimization_f_Group>; def fextdirs_EQ : Joined<["-"], "fextdirs=">, Group<f_Group>; -def : Flag<["-"], "fdefer-pop">, Group<clang_ignored_f_Group>; -def : Flag<["-"], "fno-defer-pop">, Group<clang_ignored_f_Group>; +def : Flag<["-"], "fdefer-pop">, Group<clang_ignored_gcc_optimization_f_Group>; +def : Flag<["-"], "fno-defer-pop">, Group<clang_ignored_gcc_optimization_f_Group>; def : Flag<["-"], "fextended-identifiers">, Group<clang_ignored_f_Group>; def : Flag<["-"], "fno-extended-identifiers">, Group<f_Group>, Flags<[Unsupported]>; def fhosted : Flag<["-"], "fhosted">, Group<f_Group>; @@ -566,12 +566,11 @@ def fheinous_gnu_extensions : Flag<["-"], "fheinous-gnu-extensions">, Flags<[CC1Option]>; def filelist : Separate<["-"], "filelist">, Flags<[LinkerInput]>; def : Flag<["-"], "findirect-virtual-calls">, Alias<fapple_kext>; -def finline_functions : Flag<["-"], "finline-functions">, Group<clang_ignored_f_Group>; +def finline_functions : Flag<["-"], "finline-functions">, Group<clang_ignored_gcc_optimization_f_Group>; def finline : Flag<["-"], "finline">, Group<clang_ignored_f_Group>; def finput_charset_EQ : Joined<["-"], "finput-charset=">, Group<f_Group>; def finstrument_functions : Flag<["-"], "finstrument-functions">, Group<f_Group>, Flags<[CC1Option]>, HelpText<"Generate calls to instrument function entry and exit">; -def : Flag<["-"], "fkeep-inline-functions">, Group<clang_ignored_f_Group>; def flat__namespace : Flag<["-"], "flat_namespace">; def flax_vector_conversions : Flag<["-"], "flax-vector-conversions">, Group<f_Group>; def flimited_precision_EQ : Joined<["-"], "flimited-precision=">, Group<f_Group>; @@ -686,7 +685,6 @@ def fno_gnu_keywords : Flag<["-"], "fno-gnu-keywords">, Group<f_Group>, Flags<[CC1Option]>; def fno_inline_functions : Flag<["-"], "fno-inline-functions">, Group<f_clang_Group>, Flags<[CC1Option]>; def fno_inline : Flag<["-"], "fno-inline">, Group<f_clang_Group>, Flags<[CC1Option]>; -def : Flag<["-"], "fno-keep-inline-functions">, Group<clang_ignored_f_Group>; def fno_lax_vector_conversions : Flag<["-"], "fno-lax-vector-conversions">, Group<f_Group>, HelpText<"Disallow implicit conversions between vectors with a different number of elements or different element types">, Flags<[CC1Option]>; def fno_merge_all_constants : Flag<["-"], "fno-merge-all-constants">, Group<f_Group>, @@ -805,7 +803,7 @@ def : Flag<["-"], "fsched-interblock">, Group<clang_ignored_f_Group>; def fshort_enums : Flag<["-"], "fshort-enums">, Group<f_Group>, Flags<[CC1Option]>, HelpText<"Allocate to an enum type only as many bytes as it needs for the declared range of possible values">; -def : Flag<["-"], "freorder-blocks">, Group<clang_ignored_f_Group>; +def : Flag<["-"], "freorder-blocks">, Group<clang_ignored_gcc_optimization_f_Group>; def fshort_wchar : Flag<["-"], "fshort-wchar">, Group<f_Group>, Flags<[CC1Option]>, HelpText<"Force wchar_t to be a short unsigned int">; def fno_short_wchar : Flag<["-"], "fno-short-wchar">, Group<f_Group>, Flags<[CC1Option]>, @@ -1576,53 +1574,55 @@ def _fno : Flag<["-"], "fno-"#name>; } -def fprofile_dir : Joined<["-"], "fprofile-dir=">, Group<clang_ignored_f_Group>; +defm : BooleanFFlag<"no-keep-inline-functions">, Group<clang_ignored_gcc_optimization_f_Group>; -defm profile_use : BooleanFFlag<"profile-use">, Group<clang_ignored_f_Group>; -def fprofile_use_EQ : Joined<["-"], "fprofile-use=">, Group<clang_ignored_f_Group>; +def fprofile_dir : Joined<["-"], "fprofile-dir=">, Group<clang_ignored_gcc_optimization_f_Group>; + +defm profile_use : BooleanFFlag<"profile-use">, Group<clang_ignored_gcc_optimization_f_Group>; +def fprofile_use_EQ : Joined<["-"], "fprofile-use=">, Group<clang_ignored_gcc_optimization_f_Group>; def fuse_ld_EQ : Joined<["-"], "fuse-ld=">, Group<f_Group>; -defm align_functions : BooleanFFlag<"align-functions">, Group<clang_ignored_f_Group>; -def falign_functions_EQ : Joined<["-"], "falign-functions=">, Group<clang_ignored_f_Group>; +defm align_functions : BooleanFFlag<"align-functions">, Group<clang_ignored_gcc_optimization_f_Group>; +def falign_functions_EQ : Joined<["-"], "falign-functions=">, Group<clang_ignored_gcc_optimization_f_Group>; // FIXME: This option should be supported and wired up to our diognostics, but // ignore it for now to avoid breaking builds that use it. def fdiagnostics_show_location_EQ : Joined<["-"], "fdiagnostics-show-location=">, Group<clang_ignored_f_Group>; defm eliminate_unused_debug_types : BooleanFFlag<"eliminate-unused-debug-types">, Group<clang_ignored_f_Group>; -defm float_store : BooleanFFlag<"float-store">, Group<clang_ignored_f_Group>; +defm float_store : BooleanFFlag<"float-store">, Group<clang_ignored_gcc_optimization_f_Group>; defm function_attribute_list : BooleanFFlag<"function-attribute-list">, Group<clang_ignored_f_Group>; -defm gcse : BooleanFFlag<"gcse">, Group<clang_ignored_f_Group>; +defm gcse : BooleanFFlag<"gcse">, Group<clang_ignored_gcc_optimization_f_Group>; defm gnu : BooleanFFlag<"gnu">, Group<clang_ignored_f_Group>; defm ident : BooleanFFlag<"ident">, Group<clang_ignored_f_Group>; defm implicit_templates : BooleanFFlag<"implicit-templates">, Group<clang_ignored_f_Group>; def finline_limit_EQ : Joined<["-"], "finline-limit=">, Group<clang_ignored_gcc_optimization_f_Group>; defm finline_limit : BooleanFFlag<"inline-limit">, Group<clang_ignored_gcc_optimization_f_Group>; -defm ivopts : BooleanFFlag<"ivopts">, Group<clang_ignored_f_Group>; +defm ivopts : BooleanFFlag<"ivopts">, Group<clang_ignored_gcc_optimization_f_Group>; defm non_call_exceptions : BooleanFFlag<"non-call-exceptions">, Group<clang_ignored_f_Group>; defm permissive : BooleanFFlag<"permissive">, Group<clang_ignored_f_Group>; -defm prefetch_loop_arrays : BooleanFFlag<"prefetch-loop-arrays">, Group<clang_ignored_f_Group>; +defm prefetch_loop_arrays : BooleanFFlag<"prefetch-loop-arrays">, Group<clang_ignored_gcc_optimization_f_Group>; defm printf : BooleanFFlag<"printf">, Group<clang_ignored_f_Group>; defm profile : BooleanFFlag<"profile">, Group<clang_ignored_f_Group>; -defm profile_correction : BooleanFFlag<"profile-correction">, Group<clang_ignored_f_Group>; +defm profile_correction : BooleanFFlag<"profile-correction">, Group<clang_ignored_gcc_optimization_f_Group>; defm profile_generate_sampling : BooleanFFlag<"profile-generate-sampling">, Group<clang_ignored_f_Group>; defm profile_reusedist : BooleanFFlag<"profile-reusedist">, Group<clang_ignored_f_Group>; -defm profile_values : BooleanFFlag<"profile-values">, Group<clang_ignored_f_Group>; +defm profile_values : BooleanFFlag<"profile-values">, Group<clang_ignored_gcc_optimization_f_Group>; defm regs_graph : BooleanFFlag<"regs-graph">, Group<clang_ignored_f_Group>; defm ripa : BooleanFFlag<"ripa">, Group<clang_ignored_f_Group>; -defm rounding_math : BooleanFFlag<"rounding-math">, Group<clang_ignored_f_Group>; -defm schedule_insns : BooleanFFlag<"schedule-insns">, Group<clang_ignored_f_Group>; +defm rounding_math : BooleanFFlag<"rounding-math">, Group<clang_ignored_gcc_optimization_f_Group>; +defm schedule_insns : BooleanFFlag<"schedule-insns">, Group<clang_ignored_gcc_optimization_f_Group>; defm see : BooleanFFlag<"see">, Group<clang_ignored_f_Group>; -defm signaling_nans : BooleanFFlag<"signaling-nans">, Group<clang_ignored_f_Group>; +defm signaling_nans : BooleanFFlag<"signaling-nans">, Group<clang_ignored_gcc_optimization_f_Group>; defm spec_constr_count : BooleanFFlag<"spec-constr-count">, Group<clang_ignored_f_Group>; defm strength_reduce : - BooleanFFlag<"strength-reduce">, Group<clang_ignored_f_Group>; + BooleanFFlag<"strength-reduce">, Group<clang_ignored_gcc_optimization_f_Group>; defm tls_model : BooleanFFlag<"tls-model">, Group<clang_ignored_f_Group>; -defm tracer : BooleanFFlag<"tracer">, Group<clang_ignored_f_Group>; +defm tracer : BooleanFFlag<"tracer">, Group<clang_ignored_gcc_optimization_f_Group>; defm tree_salias : BooleanFFlag<"tree-salias">, Group<clang_ignored_f_Group>; defm tree_vectorizer_verbose : BooleanFFlag<"tree-vectorizer-verbose">, Group<clang_ignored_f_Group>; -defm unroll_all_loops : BooleanFFlag<"unroll-all-loops">, Group<clang_ignored_f_Group>; -defm unswitch_loops : BooleanFFlag<"unswitch-loops">, Group<clang_ignored_f_Group>; +defm unroll_all_loops : BooleanFFlag<"unroll-all-loops">, Group<clang_ignored_gcc_optimization_f_Group>; +defm unswitch_loops : BooleanFFlag<"unswitch-loops">, Group<clang_ignored_gcc_optimization_f_Group>; // gfortran options that we recognize in the driver and pass along when Index: test/Driver/clang_f_opts.c =================================================================== --- test/Driver/clang_f_opts.c +++ test/Driver/clang_f_opts.c @@ -170,10 +170,60 @@ // IGNORE-NOT: error: unknown argument // Test that the warning is displayed on these. -// RUN: %clang -### -finline-limit=1000 %s 2>&1 | FileCheck --check-prefix=CHECK-WARNING1 %s -// RUN: %clang -### -finline-limit %s 2>&1 | FileCheck --check-prefix=CHECK-WARNING2 %s -// CHECK-WARNING1: optimization flag '-finline-limit=1000' is not supported -// CHECK-WARNING2: optimization flag '-finline-limit' is not supported +// RUN: %clang -### \ +// RUN: -finline-limit=1000 \ +// RUN: -finline-limit \ +// RUN: -fexpensive-optimizations \ +// RUN: -fno-expensive-optimizations \ +// RUN: -fno-defer-pop \ +// RUN: -finline-functions \ +// RUN: -fno-keep-inline-functions \ +// RUN: -freorder-blocks \ +// RUN: -fprofile-dir=/rand/dir \ +// RUN: -fprofile-use \ +// RUN: -fprofile-use=/rand/dir \ +// RUN: -falign-functions \ +// RUN: -falign-functions=1 \ +// RUN: -ffloat-store \ +// RUN: -fgcse \ +// RUN: -fivopts \ +// RUN: -fprefetch-loop-arrays \ +// RUN: -fprofile-correction \ +// RUN: -fprofile-values \ +// RUN: -frounding-math \ +// RUN: -fschedule-insns \ +// RUN: -fsignaling-nans \ +// RUN: -fstrength-reduce \ +// RUN: -ftracer \ +// RUN: -funroll-all-loops \ +// RUN: -funswitch-loops \ +// RUN: %s 2>&1 | FileCheck --check-prefix=CHECK-WARNING %s +// CHECK-WARNING-DAG: optimization flag '-finline-limit=1000' is not supported +// CHECK-WARNING-DAG: optimization flag '-finline-limit' is not supported +// CHECK-WARNING-DAG: optimization flag '-fexpensive-optimizations' is not supported +// CHECK-WARNING-DAG: optimization flag '-fno-expensive-optimizations' is not supported +// CHECK-WARNING-DAG: optimization flag '-fno-defer-pop' is not supported +// CHECK-WARNING-DAG: optimization flag '-finline-functions' is not supported +// CHECK-WARNING-DAG: optimization flag '-fno-keep-inline-functions' is not supported +// CHECK-WARNING-DAG: optimization flag '-freorder-blocks' is not supported +// CHECK-WARNING-DAG: optimization flag '-fprofile-dir=/rand/dir' is not supported +// CHECK-WARNING-DAG: optimization flag '-fprofile-use' is not supported +// CHECK-WARNING-DAG: optimization flag '-fprofile-use=/rand/dir' is not supported +// CHECK-WARNING-DAG: optimization flag '-falign-functions' is not supported +// CHECK-WARNING-DAG: optimization flag '-falign-functions=1' is not supported +// CHECK-WARNING-DAG: optimization flag '-ffloat-store' is not supported +// CHECK-WARNING-DAG: optimization flag '-fgcse' is not supported +// CHECK-WARNING-DAG: optimization flag '-fivopts' is not supported +// CHECK-WARNING-DAG: optimization flag '-fprefetch-loop-arrays' is not supported +// CHECK-WARNING-DAG: optimization flag '-fprofile-correction' is not supported +// CHECK-WARNING-DAG: optimization flag '-fprofile-values' is not supported +// CHECK-WARNING-DAG: optimization flag '-frounding-math' is not supported +// CHECK-WARNING-DAG: optimization flag '-fschedule-insns' is not supported +// CHECK-WARNING-DAG: optimization flag '-fsignaling-nans' is not supported +// CHECK-WARNING-DAG: optimization flag '-fstrength-reduce' is not supported +// CHECK-WARNING-DAG: optimization flag '-ftracer' is not supported +// CHECK-WARNING-DAG: optimization flag '-funroll-all-loops' is not supported +// CHECK-WARNING-DAG: optimization flag '-funswitch-loops' is not supported // Test that we mute the warning on these // RUN: %clang -### -finline-limit=1000 -Wno-invalid-command-line-argument \
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
