[cfe-commits] r66787 - in /cfe/trunk: include/clang/Basic/DiagnosticDriverKinds.def lib/Driver/Driver.cpp

Daniel Dunbar daniel at zuster.org
Thu Mar 12 02:14:00 PDT 2009


Author: ddunbar
Date: Thu Mar 12 04:13:48 2009
New Revision: 66787

URL: http://llvm.org/viewvc/llvm-project?rev=66787&view=rev
Log:
Driver: Tweak diag names to be more consistent.

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

Modified: cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.def
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.def?rev=66787&r1=66786&r2=66787&view=diff

==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.def (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticDriverKinds.def Thu Mar 12 04:13:48 2009
@@ -12,11 +12,11 @@
 #undef DRIVERSTART
 #endif
 
-DIAG(driver_no_such_file, ERROR,
+DIAG(err_drv_no_such_file, ERROR,
      "no such file or directory: '%0'")
-DIAG(driver_unsupported_opt, ERROR,
+DIAG(err_drv_unsupported_opt, ERROR,
      "unsupported option '%0'")
-DIAG(driver_unknown_stdin_type, ERROR,
+DIAG(err_drv_unknown_stdin_type, ERROR,
      "-E or -x required when input is from standard input")
-DIAG(driver_unknown_language, ERROR,
+DIAG(err_drv_unknown_language, ERROR,
      "language not recognized: '%0'")

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

==============================================================================
--- cfe/trunk/lib/Driver/Driver.cpp (original)
+++ cfe/trunk/lib/Driver/Driver.cpp Thu Mar 12 04:13:48 2009
@@ -48,7 +48,7 @@
     Arg *A = getOpts().ParseOneArg(*Args, Index, End);
     if (A) {
       if (A->getOption().isUnsupported()) {
-        Diag(clang::diag::driver_unsupported_opt) << A->getOption().getName();
+        Diag(clang::diag::err_drv_unsupported_opt) << A->getOption().getName();
         continue;
       }
 
@@ -201,7 +201,7 @@
           // Otherwise emit an error but still use a valid type to
           // avoid spurious errors (e.g., no inputs).
           if (!Args.hasArg(options::OPT_E))
-            Diag(clang::diag::driver_unknown_stdin_type);
+            Diag(clang::diag::err_drv_unknown_stdin_type);
           Ty = types::TY_C;
         } else {
           // Otherwise lookup by extension, and fallback to ObjectType
@@ -235,7 +235,7 @@
       // just adds an extra stat to the equation, but this is gcc
       // compatible.
       if (memcmp(Value, "-", 2) != 0 && !llvm::sys::Path(Value).exists())
-        Diag(clang::diag::driver_no_such_file) << A->getValue(Args);
+        Diag(clang::diag::err_drv_no_such_file) << A->getValue(Args);
       else
         Inputs.push_back(std::make_pair(Ty, A));
 
@@ -253,7 +253,7 @@
       // unknown; but this isn't very important, we might as well be
       // bug comatible.
       if (!InputType) {
-        Diag(clang::diag::driver_unknown_language) << A->getValue(Args);
+        Diag(clang::diag::err_drv_unknown_language) << A->getValue(Args);
         InputType = types::TY_Object;
       }
     }





More information about the cfe-commits mailing list