1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 12:41:49 +01:00

tblgen/ClangDiagnostics: Add support for split default warning "no-werror" and

"show-in-system-header" bits, which I will be adding in Clang shortly.

llvm-svn: 140741
This commit is contained in:
Daniel Dunbar 2011-09-29 00:29:04 +00:00
parent 6cb1647b24
commit d499233312

View File

@ -149,7 +149,7 @@ void ClangDiagsDefsEmitter::run(raw_ostream &OS) {
// Filter by component.
if (!Component.empty() && Component != R.getValueAsString("Component"))
continue;
OS << "DIAG(" << R.getName() << ", ";
OS << R.getValueAsDef("Class")->getName();
OS << ", diag::" << R.getValueAsDef("DefaultMapping")->getName();
@ -178,6 +178,22 @@ void ClangDiagsDefsEmitter::run(raw_ostream &OS) {
else
OS << ", false";
// FIXME: This condition is just to avoid temporary revlock, it can be
// removed.
if (R.getValue("WarningNoWerror")) {
// Default warning has no Werror bit.
if (R.getValueAsBit("WarningNoWerror"))
OS << ", true";
else
OS << ", false";
// Default warning show in system header bit.
if (R.getValueAsBit("WarningShowInSystemHeader"))
OS << ", true";
else
OS << ", false";
}
// Category number.
OS << ", " << CategoryIDs.getID(getDiagnosticCategory(&R, DGParentMap));