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<["-"], "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]>, @@ -1575,53 +1575,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,59 @@ // 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: ignoring unsupported optimization flag '-finline-limit=1000' // CHECK-WARNING2: ignoring unsupported optimization flag '-finline-limit' +// CHECK-WARNING3: ignoring unsupported optimization flag '-fexpensive-optimizations' +// CHECK-WARNING4: ignoring unsupported optimization flag '-fno-expensive-optimizations' +// CHECK-WARNING5: ignoring unsupported optimization flag '-fno-defer-pop' +// CHECK-WARNING6: ignoring unsupported optimization flag '-finline-functions' +// CHECK-WARNING7: ignoring unsupported optimization flag '-fkeep-inline-functions' +// CHECK-WARNING8: ignoring unsupported optimization flag '-fno-keep-inline-functions' +// CHECK-WARNING9: ignoring unsupported optimization flag '-freorder-blocks' +// CHECK-WARNING10: ignoring unsupported optimization flag '-fprofile-dir=/rand/dir' +// CHECK-WARNING11: ignoring unsupported optimization flag '-fprofile-use' +// CHECK-WARNING12: ignoring unsupported optimization flag '-fprofile-use=/rand/dir' +// CHECK-WARNING13: ignoring unsupported optimization flag '-falign-functions' +// CHECK-WARNING14: ignoring unsupported optimization flag '-falign-functions=1' +// CHECK-WARNING15: ignoring unsupported optimization flag '-ffloat-store' +// CHECK-WARNING16: ignoring unsupported optimization flag '-fgcse' +// CHECK-WARNING17: ignoring unsupported optimization flag '-fivopts' +// CHECK-WARNING18: ignoring unsupported optimization flag '-fprefetch-loop-arrays' +// CHECK-WARNING19: ignoring unsupported optimization flag '-fprofile-correction' +// CHECK-WARNING20: ignoring unsupported optimization flag '-fprofile-values' +// CHECK-WARNING21: ignoring unsupported optimization flag '-frounding-math' +// CHECK-WARNING22: ignoring unsupported optimization flag '-fschedule-insns' +// CHECK-WARNING23: ignoring unsupported optimization flag '-fsignaling-nans' +// CHECK-WARNING24: ignoring unsupported optimization flag '-fstrength-reduce' +// CHECK-WARNING25: ignoring unsupported optimization flag '-ftracer' +// CHECK-WARNING26: ignoring unsupported optimization flag '-funroll-all-loops' +// CHECK-WARNING27: ignoring unsupported optimization flag '-funswitch-loops' + // RUN: %clang -### -fshort-wchar -fno-short-wchar %s 2>&1 | FileCheck -check-prefix=CHECK-WCHAR1 %s // RUN: %clang -### -fno-short-wchar -fshort-wchar %s 2>&1 | FileCheck -check-prefix=CHECK-WCHAR2 %s