diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-12-01 17:42:06 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-12-01 17:42:06 +0000 |
commit | 32d4d80c26e8c4c1922cff4661e0b9f44a3aabfc (patch) | |
tree | f7c4736055df890c90e603e8039f760b7a01bf92 | |
parent | e6342c06356976508525145a6ba433d05f893171 (diff) |
Convert Diagnostic::getCustomDiagID to take a StringRef.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90244 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang/Basic/Diagnostic.h | 2 | ||||
-rw-r--r-- | lib/Basic/Diagnostic.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/include/clang/Basic/Diagnostic.h b/include/clang/Basic/Diagnostic.h index 00a5bc6e93..d3744326a3 100644 --- a/include/clang/Basic/Diagnostic.h +++ b/include/clang/Basic/Diagnostic.h @@ -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 diff --git a/lib/Basic/Diagnostic.cpp b/lib/Basic/Diagnostic.cpp index fbc7313116..8a0b858ba9 100644 --- a/lib/Basic/Diagnostic.cpp +++ b/lib/Basic/Diagnostic.cpp @@ -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); |