mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-02 00:36:36 +00:00
include the default mapping in the clang diagnostic .inc files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69173 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f1624aa4dc
commit
5b66c04f33
@ -69,20 +69,15 @@ static void EmitAllCaps(std::ostream& OS, const std::string &s) {
|
||||
|
||||
static void ProcessDiag(std::ostream &OS, const Record *DiagClass,
|
||||
const Record &R) {
|
||||
|
||||
const Record* DiagKind = getDiagKind(DiagClass, R);
|
||||
if (!DiagKind)
|
||||
return;
|
||||
|
||||
OS << "DIAG(" << R.getName() << ", ";
|
||||
EmitAllCaps(OS, DiagKind->getName());
|
||||
|
||||
const RecordVal* Text = findRecordVal(R, "Text");
|
||||
assert(Text && "No 'Text' entry in Diagnostic.");
|
||||
const StringInit* TextVal = dynamic_cast<const StringInit*>(Text->getValue());
|
||||
assert(TextVal && "Value 'Text' must be a string.");
|
||||
OS << ", diag::" << R.getValueAsDef("DefaultMapping")->getName();
|
||||
OS << ", \"";
|
||||
EmitEscaped(OS, TextVal->getValue());
|
||||
EmitEscaped(OS, R.getValueAsString("Text"));
|
||||
OS << "\")\n";
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user