aboutsummaryrefslogtreecommitdiff
path: root/lib/Basic/Diagnostic.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-04-15 16:44:12 +0000
committerChris Lattner <sabre@nondot.org>2009-04-15 16:44:12 +0000
commit4ac072aceb9c68f7a023050e2ab9ccacb4fe6e5b (patch)
treed576b557590d73775d179045e0a38ae8e027fee2 /lib/Basic/Diagnostic.cpp
parent41c6c46fe2b660833821067de9350e0ecd509749 (diff)
Tblgen now passes the default mapping explicitly, instead of having it
be tied to the diag class. This requires an LLVM tree update. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69175 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Basic/Diagnostic.cpp')
-rw-r--r--lib/Basic/Diagnostic.cpp23
1 files changed, 3 insertions, 20 deletions
diff --git a/lib/Basic/Diagnostic.cpp b/lib/Basic/Diagnostic.cpp
index 4dcd7c3608..bc0324e8d3 100644
--- a/lib/Basic/Diagnostic.cpp
+++ b/lib/Basic/Diagnostic.cpp
@@ -42,15 +42,8 @@ struct DefaultMappingInfo {
unsigned Mapping : 2;
};
-#define NOTE diag::MAP_IGNORE
-#define WARNING diag::MAP_WARNING
-#define EXTENSION diag::MAP_IGNORE
-#define EXTWARN diag::MAP_WARNING
-#define ERROR diag::MAP_ERROR
-#define FATAL diag::MAP_FATAL
-
static const DefaultMappingInfo DefaultMappings[] = {
-#define DIAG(ENUM,CLASS,DESC) { diag::ENUM, CLASS },
+#define DIAG(ENUM,CLASS,DEFAULT_MAPPING,DESC) { diag::ENUM, DEFAULT_MAPPING },
#include "clang/Basic/DiagnosticCommonKinds.inc"
#include "clang/Basic/DiagnosticDriverKinds.inc"
#include "clang/Basic/DiagnosticFrontendKinds.inc"
@@ -62,16 +55,6 @@ static const DefaultMappingInfo DefaultMappings[] = {
{ 0, 0 }
};
-#undef DIAG
-#undef NOTE
-#undef WARNING
-#undef EXTENSION
-#undef EXTWARN
-#undef ERROR
-#undef FATAL
-
-
-
// Diagnostic classes.
enum {
NOTE = 0x01,
@@ -83,7 +66,7 @@ enum {
};
/// DiagnosticClasses - The class for each diagnostic.
-#define DIAG(ENUM,CLASS,DESC) CLASS,
+#define DIAG(ENUM,CLASS,DEFAULT_MAPPING,DESC) CLASS,
static unsigned char DiagnosticClassesCommon[] = {
#include "clang/Basic/DiagnosticCommonKinds.inc"
0
@@ -145,7 +128,7 @@ static unsigned getBuiltinDiagClass(unsigned DiagID) {
/// DiagnosticText - An english message to print for the diagnostic. These
/// should be localized.
-#define DIAG(ENUM,CLASS,DESC) DESC,
+#define DIAG(ENUM,CLASS,DEFAULT_MAPPING,DESC) DESC,
static const char * const DiagnosticTextCommon[] = {
#include "clang/Basic/DiagnosticCommonKinds.inc"
0