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, Flags<[CoreOption]>; def fexceptions : Flag<["-"], "fexceptions">, Group, Flags<[CC1Option]>, HelpText<"Enable support for exception handling">; -def : Flag<["-"], "fexpensive-optimizations">, Group; -def : Flag<["-"], "fno-expensive-optimizations">, Group; +def : Flag<["-"], "fexpensive-optimizations">, Group; +def : Flag<["-"], "fno-expensive-optimizations">, Group; def fextdirs_EQ : Joined<["-"], "fextdirs=">, Group; -def : Flag<["-"], "fdefer-pop">, Group; -def : Flag<["-"], "fno-defer-pop">, Group; +def : Flag<["-"], "fdefer-pop">, Group; +def : Flag<["-"], "fno-defer-pop">, Group; def : Flag<["-"], "fextended-identifiers">, Group; def : Flag<["-"], "fno-extended-identifiers">, Group, Flags<[Unsupported]>; def fhosted : Flag<["-"], "fhosted">, Group; @@ -566,12 +566,12 @@ def fheinous_gnu_extensions : Flag<["-"], "fheinous-gnu-extensions">, Flags<[CC1Option]>; def filelist : Separate<["-"], "filelist">, Flags<[LinkerInput]>; def : Flag<["-"], "findirect-virtual-calls">, Alias; -def finline_functions : Flag<["-"], "finline-functions">, Group; +def finline_functions : Flag<["-"], "finline-functions">, Group; def finline : Flag<["-"], "finline">, Group; def finput_charset_EQ : Joined<["-"], "finput-charset=">, Group; def finstrument_functions : Flag<["-"], "finstrument-functions">, Group, Flags<[CC1Option]>, HelpText<"Generate calls to instrument function entry and exit">; -def : Flag<["-"], "fkeep-inline-functions">, Group; +def : Flag<["-"], "fkeep-inline-functions">, Group; def flat__namespace : Flag<["-"], "flat_namespace">; def flax_vector_conversions : Flag<["-"], "flax-vector-conversions">, Group; def flimited_precision_EQ : Joined<["-"], "flimited-precision=">, Group; @@ -686,7 +686,7 @@ def fno_gnu_keywords : Flag<["-"], "fno-gnu-keywords">, Group, Flags<[CC1Option]>; def fno_inline_functions : Flag<["-"], "fno-inline-functions">, Group, Flags<[CC1Option]>; def fno_inline : Flag<["-"], "fno-inline">, Group, Flags<[CC1Option]>; -def : Flag<["-"], "fno-keep-inline-functions">, Group; +def : Flag<["-"], "fno-keep-inline-functions">, Group; def fno_lax_vector_conversions : Flag<["-"], "fno-lax-vector-conversions">, 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, @@ -805,7 +805,7 @@ def : Flag<["-"], "fsched-interblock">, Group; def fshort_enums : Flag<["-"], "fshort-enums">, 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; +def : Flag<["-"], "freorder-blocks">, Group; def fshort_wchar : Flag<["-"], "fshort-wchar">, Group, Flags<[CC1Option]>, HelpText<"Force wchar_t to be a short unsigned int">; def fno_short_wchar : Flag<["-"], "fno-short-wchar">, Group, Flags<[CC1Option]>, @@ -1576,53 +1576,53 @@ def _fno : Flag<["-"], "fno-"#name>; } -def fprofile_dir : Joined<["-"], "fprofile-dir=">, Group; +def fprofile_dir : Joined<["-"], "fprofile-dir=">, Group; -defm profile_use : BooleanFFlag<"profile-use">, Group; -def fprofile_use_EQ : Joined<["-"], "fprofile-use=">, Group; +defm profile_use : BooleanFFlag<"profile-use">, Group; +def fprofile_use_EQ : Joined<["-"], "fprofile-use=">, Group; def fuse_ld_EQ : Joined<["-"], "fuse-ld=">, Group; -defm align_functions : BooleanFFlag<"align-functions">, Group; -def falign_functions_EQ : Joined<["-"], "falign-functions=">, Group; +defm align_functions : BooleanFFlag<"align-functions">, Group; +def falign_functions_EQ : Joined<["-"], "falign-functions=">, 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; defm eliminate_unused_debug_types : BooleanFFlag<"eliminate-unused-debug-types">, Group; -defm float_store : BooleanFFlag<"float-store">, Group; +defm float_store : BooleanFFlag<"float-store">, Group; defm function_attribute_list : BooleanFFlag<"function-attribute-list">, Group; -defm gcse : BooleanFFlag<"gcse">, Group; +defm gcse : BooleanFFlag<"gcse">, Group; defm gnu : BooleanFFlag<"gnu">, Group; defm ident : BooleanFFlag<"ident">, Group; defm implicit_templates : BooleanFFlag<"implicit-templates">, Group; def finline_limit_EQ : Joined<["-"], "finline-limit=">, Group; defm finline_limit : BooleanFFlag<"inline-limit">, Group; -defm ivopts : BooleanFFlag<"ivopts">, Group; +defm ivopts : BooleanFFlag<"ivopts">, Group; defm non_call_exceptions : BooleanFFlag<"non-call-exceptions">, Group; defm permissive : BooleanFFlag<"permissive">, Group; -defm prefetch_loop_arrays : BooleanFFlag<"prefetch-loop-arrays">, Group; +defm prefetch_loop_arrays : BooleanFFlag<"prefetch-loop-arrays">, Group; defm printf : BooleanFFlag<"printf">, Group; defm profile : BooleanFFlag<"profile">, Group; -defm profile_correction : BooleanFFlag<"profile-correction">, Group; +defm profile_correction : BooleanFFlag<"profile-correction">, Group; defm profile_generate_sampling : BooleanFFlag<"profile-generate-sampling">, Group; defm profile_reusedist : BooleanFFlag<"profile-reusedist">, Group; -defm profile_values : BooleanFFlag<"profile-values">, Group; +defm profile_values : BooleanFFlag<"profile-values">, Group; defm regs_graph : BooleanFFlag<"regs-graph">, Group; defm ripa : BooleanFFlag<"ripa">, Group; -defm rounding_math : BooleanFFlag<"rounding-math">, Group; -defm schedule_insns : BooleanFFlag<"schedule-insns">, Group; +defm rounding_math : BooleanFFlag<"rounding-math">, Group; +defm schedule_insns : BooleanFFlag<"schedule-insns">, Group; defm see : BooleanFFlag<"see">, Group; -defm signaling_nans : BooleanFFlag<"signaling-nans">, Group; +defm signaling_nans : BooleanFFlag<"signaling-nans">, Group; defm spec_constr_count : BooleanFFlag<"spec-constr-count">, Group; defm strength_reduce : - BooleanFFlag<"strength-reduce">, Group; + BooleanFFlag<"strength-reduce">, Group; defm tls_model : BooleanFFlag<"tls-model">, Group; -defm tracer : BooleanFFlag<"tracer">, Group; +defm tracer : BooleanFFlag<"tracer">, Group; defm tree_salias : BooleanFFlag<"tree-salias">, Group; defm tree_vectorizer_verbose : BooleanFFlag<"tree-vectorizer-verbose">, Group; -defm unroll_all_loops : BooleanFFlag<"unroll-all-loops">, Group; -defm unswitch_loops : BooleanFFlag<"unswitch-loops">, Group; +defm unroll_all_loops : BooleanFFlag<"unroll-all-loops">, Group; +defm unswitch_loops : BooleanFFlag<"unswitch-loops">, 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 @@ -172,8 +172,58 @@ // 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 +// RUN: %clang -### -fexpensive-optimizations %s 2>&1 | FileCheck --check-prefix=CHECK-WARNING3 %s +// RUN: %clang -### -fno-expensive-optimizations %s 2>&1 | FileCheck --check-prefix=CHECK-WARNING4 %s +// RUN: %clang -### -fno-defer-pop %s 2>&1 | FileCheck --check-prefix=CHECK-WARNING5 %s +// RUN: %clang -### -finline-functions %s 2>&1 | FileCheck --check-prefix=CHECK-WARNING6 %s +// RUN: %clang -### -fkeep-inline-functions %s 2>&1 | FileCheck --check-prefix=CHECK-WARNING7 %s +// RUN: %clang -### -fno-keep-inline-functions %s 2>&1 | FileCheck --check-prefix=CHECK-WARNING8 %s +// RUN: %clang -### -freorder-blocks %s 2>&1 | FileCheck --check-prefix=CHECK-WARNING9 %s +// RUN: %clang -### -fprofile-dir=/rand/dir %s 2>&1 | FileCheck --check-prefix=CHECK-WARNING10 %s +// RUN: %clang -### -fprofile-use %s 2>&1 | FileCheck --check-prefix=CHECK-WARNING11 %s +// RUN: %clang -### -fprofile-use=/rand/dir %s 2>&1 | FileCheck --check-prefix=CHECK-WARNING12 %s +// RUN: %clang -### -falign-functions %s 2>&1 | FileCheck --check-prefix=CHECK-WARNING13 %s +// RUN: %clang -### -falign-functions=1 %s 2>&1 | FileCheck --check-prefix=CHECK-WARNING14 %s +// RUN: %clang -### -ffloat-store %s 2>&1 | FileCheck --check-prefix=CHECK-WARNING15 %s +// RUN: %clang -### -fgcse %s 2>&1 | FileCheck --check-prefix=CHECK-WARNING16 %s +// RUN: %clang -### -fivopts %s 2>&1 | FileCheck --check-prefix=CHECK-WARNING17 %s +// RUN: %clang -### -fprefetch-loop-arrays %s 2>&1 | FileCheck --check-prefix=CHECK-WARNING18 %s +// RUN: %clang -### -fprofile-correction %s 2>&1 | FileCheck --check-prefix=CHECK-WARNING19 %s +// RUN: %clang -### -fprofile-values %s 2>&1 | FileCheck --check-prefix=CHECK-WARNING20 %s +// RUN: %clang -### -frounding-math %s 2>&1 | FileCheck --check-prefix=CHECK-WARNING21 %s +// RUN: %clang -### -fschedule-insns %s 2>&1 | FileCheck --check-prefix=CHECK-WARNING22 %s +// RUN: %clang -### -fsignaling-nans %s 2>&1 | FileCheck --check-prefix=CHECK-WARNING23 %s +// RUN: %clang -### -fstrength-reduce %s 2>&1 | FileCheck --check-prefix=CHECK-WARNING24 %s +// RUN: %clang -### -ftracer %s 2>&1 | FileCheck --check-prefix=CHECK-WARNING25 %s +// RUN: %clang -### -funroll-all-loops %s 2>&1 | FileCheck --check-prefix=CHECK-WARNING26 %s +// RUN: %clang -### -funswitch-loops %s 2>&1 | FileCheck --check-prefix=CHECK-WARNING27 %s // CHECK-WARNING1: optimization flag '-finline-limit=1000' is not supported // CHECK-WARNING2: optimization flag '-finline-limit' is not supported +// CHECK-WARNING3: optimization flag '-fexpensive-optimizations' is not supported +// CHECK-WARNING4: optimization flag '-fno-expensive-optimizations' is not supported +// CHECK-WARNING5: optimization flag '-fno-defer-pop' is not supported +// CHECK-WARNING6: optimization flag '-finline-functions' is not supported +// CHECK-WARNING7: optimization flag '-fkeep-inline-functions' is not supported +// CHECK-WARNING8: optimization flag '-fno-keep-inline-functions' is not supported +// CHECK-WARNING9: optimization flag '-freorder-blocks' is not supported +// CHECK-WARNING10: optimization flag '-fprofile-dir=/rand/dir' is not supported +// CHECK-WARNING11: optimization flag '-fprofile-use' is not supported +// CHECK-WARNING12: optimization flag '-fprofile-use=/rand/dir' is not supported +// CHECK-WARNING13: optimization flag '-falign-functions' is not supported +// CHECK-WARNING14: optimization flag '-falign-functions=1' is not supported +// CHECK-WARNING15: optimization flag '-ffloat-store' is not supported +// CHECK-WARNING16: optimization flag '-fgcse' is not supported +// CHECK-WARNING17: optimization flag '-fivopts' is not supported +// CHECK-WARNING18: optimization flag '-fprefetch-loop-arrays' is not supported +// CHECK-WARNING19: optimization flag '-fprofile-correction' is not supported +// CHECK-WARNING20: optimization flag '-fprofile-values' is not supported +// CHECK-WARNING21: optimization flag '-frounding-math' is not supported +// CHECK-WARNING22: optimization flag '-fschedule-insns' is not supported +// CHECK-WARNING23: optimization flag '-fsignaling-nans' is not supported +// CHECK-WARNING24: optimization flag '-fstrength-reduce' is not supported +// CHECK-WARNING25: optimization flag '-ftracer' is not supported +// CHECK-WARNING26: optimization flag '-funroll-all-loops' is not supported +// CHECK-WARNING27: 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 \