[cfe-commits] r90244 - in /cfe/trunk: include/clang/Basic/Diagnostic.h lib/Basic/Diagnostic.cpp

Daniel Dunbar daniel at zuster.org
Tue Dec 1 09:42:06 PST 2009


Author: ddunbar
Date: Tue Dec  1 11:42:06 2009
New Revision: 90244

URL: http://llvm.org/viewvc/llvm-project?rev=90244&view=rev
Log:
Convert Diagnostic::getCustomDiagID to take a StringRef.

Modified:
    cfe/trunk/include/clang/Basic/Diagnostic.h
    cfe/trunk/lib/Basic/Diagnostic.cpp

Modified: cfe/trunk/include/clang/Basic/Diagnostic.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/Diagnostic.h?rev=90244&r1=90243&r2=90244&view=diff

==============================================================================
--- cfe/trunk/include/clang/Basic/Diagnostic.h (original)
+++ cfe/trunk/include/clang/Basic/Diagnostic.h Tue Dec  1 11:42:06 2009
@@ -319,7 +319,7 @@
   /// getCustomDiagID - Return an ID for a diagnostic with the specified message
   /// and level.  If this is the first request for this diagnosic, it is
   /// registered and created, otherwise the existing ID is returned.
-  unsigned getCustomDiagID(Level L, const char *Message);
+  unsigned getCustomDiagID(Level L, llvm::StringRef Message);
 
 
   /// ConvertArgToString - This method converts a diagnostic argument (as an

Modified: cfe/trunk/lib/Basic/Diagnostic.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Diagnostic.cpp?rev=90244&r1=90243&r2=90244&view=diff

==============================================================================
--- cfe/trunk/lib/Basic/Diagnostic.cpp (original)
+++ cfe/trunk/lib/Basic/Diagnostic.cpp Tue Dec  1 11:42:06 2009
@@ -163,7 +163,7 @@
         return DiagInfo[DiagID-DIAG_UPPER_LIMIT].first;
       }
 
-      unsigned getOrCreateDiagID(Diagnostic::Level L, const char *Message,
+      unsigned getOrCreateDiagID(Diagnostic::Level L, llvm::StringRef Message,
                                  Diagnostic &Diags) {
         DiagDesc D(L, Message);
         // Check to see if it already exists.
@@ -246,7 +246,7 @@
 /// getCustomDiagID - Return an ID for a diagnostic with the specified message
 /// and level.  If this is the first request for this diagnosic, it is
 /// registered and created, otherwise the existing ID is returned.
-unsigned Diagnostic::getCustomDiagID(Level L, const char *Message) {
+unsigned Diagnostic::getCustomDiagID(Level L, llvm::StringRef Message) {
   if (CustomDiagInfo == 0)
     CustomDiagInfo = new diag::CustomDiagInfo();
   return CustomDiagInfo->getOrCreateDiagID(L, Message, *this);





More information about the cfe-commits mailing list