diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-03-27 15:22:28 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-03-27 15:22:28 +0000 |
commit | b9f3a777e503851964c9542a0261e45eece59747 (patch) | |
tree | 584184ca3e7e15f7f428d4af656b823c95507d5b /lib/Driver/Tools.cpp | |
parent | 89e65a1fabf5a9569b3358203b8e9e9813209b8f (diff) |
Driver: Pass -f[no-]pascal-strings on to clang, even if it has been
turned into -m[no-]pascal-strings by the tool chain.
- This still has issue that derived arguments don't propogate "used"
information correctly so spurious "argument unused" warnings will
still show up.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67841 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Tools.cpp')
-rw-r--r-- | lib/Driver/Tools.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index 248df2786f..db11945e89 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -306,6 +306,18 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, Args.AddAllArgs(CmdArgs, options::OPT_clang_f_Group); + // If tool chain translates fpascal-strings, we want to back + // translate here. + // FIXME: This is gross; that translation should be pulled from the + // tool chain. + if (Arg *A = Args.getLastArg(options::OPT_mpascal_strings, + options::OPT_mno_pascal_strings)) { + if (A->getOption().matches(options::OPT_mpascal_strings)) + CmdArgs.push_back("-fpascal-strings"); + else + CmdArgs.push_back("-fno-pascal-strings"); + } + Args.AddLastArg(CmdArgs, options::OPT_dM); Args.AddAllArgValues(CmdArgs, options::OPT_Xclang); |