Thanks, will do.
On Wed, Jul 31, 2013 at 4:47 PM, Chandler Carruth <[email protected]> wrote: > FYI, this meets my bar for "obvious", feel free to move patches of this > level of complexity to post-commit. > > > On Wed, Jul 31, 2013 at 10:41 AM, Hans Wennborg <[email protected]> wrote: >> >> Hi rnk, >> >> This way we don't have to translate it manually in Clang::ConstructJob. >> >> http://llvm-reviews.chandlerc.com/D1249 >> >> Files: >> include/clang/Driver/Options.td >> lib/Driver/Tools.cpp >> test/Driver/clang_f_opts.c >> >> Index: include/clang/Driver/Options.td >> =================================================================== >> --- include/clang/Driver/Options.td >> +++ include/clang/Driver/Options.td >> @@ -937,7 +937,8 @@ >> def mno_global_merge : Flag<["-"], "mno-global-merge">, Group<m_Group>, >> Flags<[CC1Option]>, >> HelpText<"Disable merging of globals">; >> def mno_mmx : Flag<["-"], "mno-mmx">, Group<m_x86_Features_Group>; >> -def mno_pascal_strings : Flag<["-"], "mno-pascal-strings">, >> Group<m_Group>; >> +def mno_pascal_strings : Flag<["-"], "mno-pascal-strings">, >> + Alias<fno_pascal_strings>; >> def mno_red_zone : Flag<["-"], "mno-red-zone">, Group<m_Group>; >> def mno_relax_all : Flag<["-"], "mno-relax-all">, Group<m_Group>; >> def mno_rtd: Flag<["-"], "mno-rtd">, Group<m_Group>; >> @@ -976,7 +977,7 @@ >> def momit_leaf_frame_pointer : Flag<["-"], "momit-leaf-frame-pointer">, >> Group<m_Group>, >> HelpText<"Omit frame pointer setup for leaf functions">, >> Flags<[CC1Option]>; >> def moslib_EQ : Joined<["-"], "moslib=">, Group<m_Group>; >> -def mpascal_strings : Flag<["-"], "mpascal-strings">, Group<m_Group>; >> +def mpascal_strings : Flag<["-"], "mpascal-strings">, >> Alias<fpascal_strings>; >> def mred_zone : Flag<["-"], "mred-zone">, Group<m_Group>; >> def mregparm_EQ : Joined<["-"], "mregparm=">, Group<m_Group>; >> def mrelax_all : Flag<["-"], "mrelax-all">, Group<m_Group>, >> Flags<[CC1Option]>, >> Index: lib/Driver/Tools.cpp >> =================================================================== >> --- lib/Driver/Tools.cpp >> +++ lib/Driver/Tools.cpp >> @@ -3300,16 +3300,9 @@ >> if (Arg *A = Args.getLastArg(options::OPT_fshort_wchar)) >> A->render(Args, CmdArgs); >> >> - // -fno-pascal-strings is default, only pass non-default. If the tool >> chain >> - // happened to translate to -mpascal-strings, we want to back translate >> here. >> - // >> - // FIXME: This is gross; that translation should be pulled from the >> - // tool chain. >> + // -fno-pascal-strings is default, only pass non-default. >> if (Args.hasFlag(options::OPT_fpascal_strings, >> options::OPT_fno_pascal_strings, >> - false) || >> - Args.hasFlag(options::OPT_mpascal_strings, >> - options::OPT_mno_pascal_strings, >> false)) >> CmdArgs.push_back("-fpascal-strings"); >> >> Index: test/Driver/clang_f_opts.c >> =================================================================== >> --- test/Driver/clang_f_opts.c >> +++ test/Driver/clang_f_opts.c >> @@ -71,3 +71,9 @@ >> // CHECK-EXTENDED-IDENTIFIERS: "-cc1" >> // CHECK-EXTENDED-IDENTIFIERS-NOT: "-fextended-identifiers" >> // CHECK-NO-EXTENDED-IDENTIFIERS: error: unsupported option >> '-fno-extended-identifiers' >> + >> +// RUN: %clang -### -S -fno-pascal-strings -mpascal-strings %s 2>&1 | >> FileCheck -check-prefix=CHECK-M-PASCAL-STRINGS %s >> +// CHECK-M-PASCAL-STRINGS: "-fpascal-strings" >> + >> +// RUN: %clang -### -S -fpascal-strings -mno-pascal-strings %s 2>&1 | >> FileCheck -check-prefix=CHECK-NO-M-PASCAL-STRINGS %s >> +// CHECK-NO-M-PASCAL-STRINGS-NOT: "-fpascal-strings" >> >> _______________________________________________ >> 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
