summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-12-01 17:42:06 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-12-01 17:42:06 +0000
commit4886c8154d875b3ff1b120f4a1008d356a7f91eb (patch)
treecbc413ae2af7364db81275d439c7990a987cd11d
parent86fc9207423995727e23ea874ec9084603edb3aa (diff)
downloadbcm5719-llvm-4886c8154d875b3ff1b120f4a1008d356a7f91eb.tar.gz
bcm5719-llvm-4886c8154d875b3ff1b120f4a1008d356a7f91eb.zip
Convert Diagnostic::getCustomDiagID to take a StringRef.
llvm-svn: 90244
-rw-r--r--clang/include/clang/Basic/Diagnostic.h2
-rw-r--r--clang/lib/Basic/Diagnostic.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/clang/include/clang/Basic/Diagnostic.h b/clang/include/clang/Basic/Diagnostic.h
index 00a5bc6e937..d3744326a3d 100644
--- a/clang/include/clang/Basic/Diagnostic.h
+++ b/clang/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/clang/lib/Basic/Diagnostic.cpp b/clang/lib/Basic/Diagnostic.cpp
index fbc73131165..8a0b858ba9a 100644
--- a/clang/lib/Basic/Diagnostic.cpp
+++ b/clang/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);
OpenPOWER on IntegriCloud