mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-26 13:36:28 +00:00
include the default mapping in the clang diagnostic .inc files.
llvm-svn: 69173
This commit is contained in:
parent
03d5a78eca
commit
9e2f6e304c
@ -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