[cfe-commits] r117600 - in /cfe/trunk: include/clang/Basic/DiagnosticDriverKinds.td lib/Driver/Tools.cpp

Daniel Dunbar daniel at zuster.org
Thu Oct 28 13:36:23 PDT 2010


Author: ddunbar
Date: Thu Oct 28 15:36:23 2010
New Revision: 117600

URL: http://llvm.org/viewvc/llvm-project?rev=117600&view=rev
Log:
Driver/IA: Ignore -L for now, which users shouldn't be using for semantic effect.

Modified:
    cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td
    cfe/trunk/lib/Driver/Tools.cpp

Modified: cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td?rev=117600&r1=117599&r2=117600&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.td Thu Oct 28 15:36:23 2010
@@ -77,6 +77,8 @@
 def err_drv_preamble_format : Error<
     "incorrect format for -preamble-bytes=N,END">;
 
+def warn_drv_unsupported_option_argument : Warning<
+  "ignoring unsupported argument '%1' to option '%0'">;
 def warn_drv_input_file_unused : Warning<
   "%0: '%1' input unused when '%2' is present">;
 def warn_drv_preprocessed_input_file_unused : Warning<

Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=117600&r1=117599&r2=117600&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Thu Oct 28 15:36:23 2010
@@ -784,6 +784,11 @@
 
         if (Value == "-force_cpusubtype_ALL") {
           // Do nothing, this is the default and we don't support anything else.
+        } else if (Value == "-L") {
+          // We don't support -L yet, but it isn't important enough to error
+          // on. No one should really be using it for a semantic change.
+          D.Diag(clang::diag::warn_drv_unsupported_option_argument)
+            << A->getOption().getName() << Value;
         } else {
           D.Diag(clang::diag::err_drv_unsupported_option_argument)
             << A->getOption().getName() << Value;





More information about the cfe-commits mailing list