1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00

prove diagnostic -> group mapping information.

llvm-svn: 69270
This commit is contained in:
Chris Lattner 2009-04-16 05:52:18 +00:00
parent 98aa1d9693
commit 1a7c8feff3

View File

@ -50,10 +50,22 @@ void ClangDiagsDefsEmitter::run(std::ostream &OS) {
OS << "DIAG(" << R.getName() << ", ";
OS << R.getValueAsDef("Class")->getName();
OS << ", diag::" << R.getValueAsDef("DefaultMapping")->getName();
// Description string.
OS << ", \"";
std::string S = R.getValueAsString("Text");
EscapeString(S);
OS << S << "\")\n";
OS << S << "\"";
// Warning associated with the diagnostic.
if (DefInit *DI = dynamic_cast<DefInit*>(R.getValueInit("Group"))) {
S = DI->getDef()->getValueAsString("GroupName");
EscapeString(S);
OS << ", \"" << S << "\"";
} else {
OS << ", 0";
}
OS << ")\n";
}
}