[cfe-commits] r67841 - /cfe/trunk/lib/Driver/Tools.cpp

Daniel Dunbar daniel at zuster.org
Fri Mar 27 08:22:56 PDT 2009


Author: ddunbar
Date: Fri Mar 27 10:22:28 2009
New Revision: 67841

URL: http://llvm.org/viewvc/llvm-project?rev=67841&view=rev
Log:
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.

Modified:
    cfe/trunk/lib/Driver/Tools.cpp

Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=67841&r1=67840&r2=67841&view=diff

==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Fri Mar 27 10:22:28 2009
@@ -306,6 +306,18 @@
 
   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);





More information about the cfe-commits mailing list