]> granicus.if.org Git - clang/commitdiff
Convert Diagnostic::getCustomDiagID to take a StringRef.
authorDaniel Dunbar <daniel@zuster.org>
Tue, 1 Dec 2009 17:42:06 +0000 (17:42 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Tue, 1 Dec 2009 17:42:06 +0000 (17:42 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90244 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/Diagnostic.h
lib/Basic/Diagnostic.cpp

index 00a5bc6e937d9dc1e2bb180bf77344f880926359..d3744326a3dd0c37c7ce271f5cb73844d84ab80c 100644 (file)
@@ -319,7 +319,7 @@ public:
   /// 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
index fbc7313116531099437b66cc8098e74d234ec88a..8a0b858ba9ac834798d57da0cd96fe500b0dfe07 100644 (file)
@@ -163,7 +163,7 @@ namespace clang {
         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 @@ bool Diagnostic::popMappings() {
 /// 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);