diff options
author | Chris Lattner <sabre@nondot.org> | 2009-04-15 16:44:12 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-04-15 16:44:12 +0000 |
commit | 1b595624a841305ba3c982e380f887951de879a0 (patch) | |
tree | ea7fa49109f2e711071ad92d9deb07e32c5cba6d /clang/lib/Basic | |
parent | 485626c5f5ea4a5bc610728784a383906a6d6580 (diff) | |
download | bcm5719-llvm-1b595624a841305ba3c982e380f887951de879a0.tar.gz bcm5719-llvm-1b595624a841305ba3c982e380f887951de879a0.zip |
Tblgen now passes the default mapping explicitly, instead of having it
be tied to the diag class. This requires an LLVM tree update.
llvm-svn: 69175
Diffstat (limited to 'clang/lib/Basic')
-rw-r--r-- | clang/lib/Basic/Diagnostic.cpp | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/clang/lib/Basic/Diagnostic.cpp b/clang/lib/Basic/Diagnostic.cpp index 4dcd7c36087..bc0324e8d33 100644 --- a/clang/lib/Basic/Diagnostic.cpp +++ b/clang/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 |