[clang] 26dbb93 - [Driver] Fix -fpascal-strings on Darwin

Fangrui Song via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 14 10:24:08 PDT 2022


This fixed failure of clang_f_opts.c after
bfafa105aab05e2c243e74114739b7d37f8ab0be
when the LLVM_DEFAULT_TARGET_TRIPLE looks like arm64-apple-darwin.
Sorry that I did not provide enough information in the message.

I think the few lines in Darwin.cpp should just be removed since
-mpascal-strings is an alias for -fpascal-strings on all targets.

On Thu, Apr 14, 2022 at 5:53 AM Aaron Ballman <aaron at aaronballman.com> wrote:
>
> Should there be some test coverage for this change (or was this fixing
> an already failing test)?
>
> ~Aaron
>
> On Thu, Apr 14, 2022 at 2:01 AM Fangrui Song via cfe-commits
> <cfe-commits at lists.llvm.org> wrote:
> >
> >
> > Author: Fangrui Song
> > Date: 2022-04-13T23:00:57-07:00
> > New Revision: 26dbb93704bf39a198909d04ad8c49b4bde46cce
> >
> > URL: https://github.com/llvm/llvm-project/commit/26dbb93704bf39a198909d04ad8c49b4bde46cce
> > DIFF: https://github.com/llvm/llvm-project/commit/26dbb93704bf39a198909d04ad8c49b4bde46cce.diff
> >
> > LOG: [Driver] Fix -fpascal-strings on Darwin
> >
> > Added:
> >
> >
> > Modified:
> >     clang/lib/Driver/ToolChains/Darwin.cpp
> >
> > Removed:
> >
> >
> >
> > ################################################################################
> > diff  --git a/clang/lib/Driver/ToolChains/Darwin.cpp b/clang/lib/Driver/ToolChains/Darwin.cpp
> > index 9f0eeea8d54e2..aaa4c6e5aabb8 100644
> > --- a/clang/lib/Driver/ToolChains/Darwin.cpp
> > +++ b/clang/lib/Driver/ToolChains/Darwin.cpp
> > @@ -2554,11 +2554,11 @@ DerivedArgList *MachO::TranslateArgs(const DerivedArgList &Args,
> >        break;
> >
> >      case options::OPT_fpascal_strings:
> > -      DAL->AddFlagArg(A, Opts.getOption(options::OPT_mpascal_strings));
> > +      DAL->AddFlagArg(A, Opts.getOption(options::OPT_fpascal_strings));
> >        break;
> >
> >      case options::OPT_fno_pascal_strings:
> > -      DAL->AddFlagArg(A, Opts.getOption(options::OPT_mno_pascal_strings));
> > +      DAL->AddFlagArg(A, Opts.getOption(options::OPT_fno_pascal_strings));
> >        break;
> >      }
> >    }
> >
> >
> >
> > _______________________________________________
> > cfe-commits mailing list
> > cfe-commits at lists.llvm.org
> > https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


More information about the cfe-commits mailing list