On Thu, Sep 26, 2013 at 6:10 AM, Rafael Espindola < [email protected]> wrote:
> Author: rafael > Date: Thu Sep 26 08:10:14 2013 > New Revision: 191429 > > URL: http://llvm.org/viewvc/llvm-project?rev=191429&view=rev > Log: > Ignore some -f options that are supported by gcc. > > It is possible that we should say some of these are unsupported, but this > is > not any worse than the old behavior of ignoring all unknown -f options. > > Modified: > cfe/trunk/include/clang/Driver/Options.td > cfe/trunk/test/Driver/clang_f_opts.c > > Modified: cfe/trunk/include/clang/Driver/Options.td > URL: > http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Options.td?rev=191429&r1=191428&r2=191429&view=diff > > ============================================================================== > --- cfe/trunk/include/clang/Driver/Options.td (original) > +++ cfe/trunk/include/clang/Driver/Options.td Thu Sep 26 08:10:14 2013 > @@ -1364,6 +1364,37 @@ def Z_reserved_lib_stdcxx : Flag<["-"], > def Z_reserved_lib_cckext : Flag<["-"], "Z-reserved-lib-cckext">, > Flags<[LinkerInput, NoArgumentUnused, Unsupported]>, > Group<reserved_lib_Group>; > > +// Ignored options > +// FIXME: multiclasess produce suffixes, not prefixes. This is fine for > now > +// since it is only used in ignored options. > +multiclass BooleanFFlag<list<string> prefixes, string name> { > + def _f : Flag<["-"], "f"#name>; > + def _fno : Flag<["-"], "fno-"#name>; > +} > This doesn't actually use prefixes. Since all -f flags only use a dash prefix, can you nuke prefixes here? > + > +def fprofile_dir : Joined<["-"], "fprofile-dir=">, > Group<clang_ignored_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>; > + > +defm falign_functions : BooleanFFlag<["-"], "align-functions">, > Group<clang_ignored_f_Group>; > +def falign_functions_eq : Joined<["-"], "falign-functions=">, > Group<clang_ignored_f_Group>; > + > +defm tracer : BooleanFFlag<["-"], "tracer">, Group<clang_ignored_f_Group>; > +defm unroll_all_loops : BooleanFFlag<["-"], "unroll-all-loops">, > Group<clang_ignored_f_Group>; > +defm sse : BooleanFFlag<["-"], "see">, Group<clang_ignored_f_Group>; > +defm rounding_math : BooleanFFlag<["-"], "rounding-math">, > Group<clang_ignored_f_Group>; > +defm profile_values : BooleanFFlag<["-"], "profile-values">, > Group<clang_ignored_f_Group>; > +defm profile_correction : BooleanFFlag<["-"], "profile-correction">, > Group<clang_ignored_f_Group>; > +defm prefetch_loop_arrays : BooleanFFlag<["-"], "prefetch-loop-arrays">, > Group<clang_ignored_f_Group>; > +defm permissive : BooleanFFlag<["-"], "permissive">, > Group<clang_ignored_f_Group>; > +defm non_call_exceptions : BooleanFFlag<["-"], "non-call-exceptions">, > Group<clang_ignored_f_Group>; > +defm ivopts : BooleanFFlag<["-"], "ivopts">, Group<clang_ignored_f_Group>; > +defm ident : BooleanFFlag<["-"], "ident">, Group<clang_ignored_f_Group>; > +defm gcse : BooleanFFlag<["-"], "gcse">, 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>; > + > include "CC1Options.td" > > include "CLCompatOptions.td" > > Modified: cfe/trunk/test/Driver/clang_f_opts.c > URL: > http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/clang_f_opts.c?rev=191429&r1=191428&r2=191429&view=diff > > ============================================================================== > --- cfe/trunk/test/Driver/clang_f_opts.c (original) > +++ cfe/trunk/test/Driver/clang_f_opts.c Thu Sep 26 08:10:14 2013 > @@ -99,3 +99,26 @@ > // RUN: %clang -### -S -O4 %s 2>&1 | FileCheck -check-prefix=CHECK-MAX-O > %s > // CHECK-MAX-O: warning: -O4 is equivalent to -O3 > // CHECK-MAX-O: -O3 > + > +// Test that we don't error on these. > +// RUN: %clang -### -S > \ > +// RUN: -falign-functions -falign-functions=2 -fno-align-functions > \ > +// RUN: -fasynchronous-unwind-tables -fno-asynchronous-unwind-tables > \ > +// RUN: -fbuiltin -fno-builtin > \ > +// RUN: -ffloat-store -fno-float-store > \ > +// RUN: -feliminate-unused-debug-types > -fno-eliminate-unused-debug-types \ > +// RUN: -fgcse -fno-gcse > \ > +// RUN: -fident -fno-ident > \ > +// RUN: -fivopts -fno-ivopts > \ > +// RUN: -fnon-call-exceptions -fno-non-call-exceptions > \ > +// RUN: -fpermissive -fno-permissive > \ > +// RUN: -fprefetch-loop-arrays -fno-prefetch-loop-arrays > \ > +// RUN: -fprofile-correction -fno-profile-correction > \ > +// RUN: -fprofile-dir=bar > \ > +// RUN: -fprofile-use -fprofile-use=zed -fno-profile-use > \ > +// RUN: -fprofile-values -fno-profile-values > \ > +// RUN: -frounding-math -fno-rounding-math > \ > +// RUN: -fsee -fno-see > \ > +// RUN: -ftracer -fno-tracer > \ > +// RUN: -funroll-all-loops -fno-unroll-all-loops > \ > +// RUN: %s > > > _______________________________________________ > cfe-commits mailing list > [email protected] > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits >
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
