diff options
author | Daniel Dunbar <daniel@zuster.org> | 2011-09-29 00:29:04 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2011-09-29 00:29:04 +0000 |
commit | caf191289365ba6f551969baf1dad22238820e75 (patch) | |
tree | d1e07e9665e9ff72295d23d58c79b87cd4380612 /utils | |
parent | 5cd4ee7770d5e7dad78398b78cd7b1f5812d21e1 (diff) | |
download | llvm-caf191289365ba6f551969baf1dad22238820e75.tar.gz llvm-caf191289365ba6f551969baf1dad22238820e75.tar.bz2 llvm-caf191289365ba6f551969baf1dad22238820e75.tar.xz |
tblgen/ClangDiagnostics: Add support for split default warning "no-werror" and
"show-in-system-header" bits, which I will be adding in Clang shortly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140741 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r-- | utils/TableGen/ClangDiagnosticsEmitter.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/utils/TableGen/ClangDiagnosticsEmitter.cpp b/utils/TableGen/ClangDiagnosticsEmitter.cpp index 0a48e75681..130f3e1e76 100644 --- a/utils/TableGen/ClangDiagnosticsEmitter.cpp +++ b/utils/TableGen/ClangDiagnosticsEmitter.cpp @@ -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)); |