mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-31 17:42:40 +00:00
prove diagnostic -> group mapping information.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69270 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2d1be87ee4
commit
bfc0104c76
@ -50,10 +50,22 @@ void ClangDiagsDefsEmitter::run(std::ostream &OS) {
|
|||||||
OS << "DIAG(" << R.getName() << ", ";
|
OS << "DIAG(" << R.getName() << ", ";
|
||||||
OS << R.getValueAsDef("Class")->getName();
|
OS << R.getValueAsDef("Class")->getName();
|
||||||
OS << ", diag::" << R.getValueAsDef("DefaultMapping")->getName();
|
OS << ", diag::" << R.getValueAsDef("DefaultMapping")->getName();
|
||||||
|
|
||||||
|
// Description string.
|
||||||
OS << ", \"";
|
OS << ", \"";
|
||||||
std::string S = R.getValueAsString("Text");
|
std::string S = R.getValueAsString("Text");
|
||||||
EscapeString(S);
|
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";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user