diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-10-17 20:43:19 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-10-17 20:43:19 +0000 |
commit | 8eff29d805e32bd03ef0e14c5d25384b35498336 (patch) | |
tree | 4705d5fbb32172d1631a7a71e0a3ffed4bb43d8b /llvm/utils/TableGen/ClangDiagnosticsEmitter.cpp | |
parent | 4108c43fd1c3b9d8fb996e3836352668190d3c55 (diff) | |
download | bcm5719-llvm-8eff29d805e32bd03ef0e14c5d25384b35498336.tar.gz bcm5719-llvm-8eff29d805e32bd03ef0e14c5d25384b35498336.zip |
Use raw_ostream::write_escaped instead of EscapeString.
llvm-svn: 84356
Diffstat (limited to 'llvm/utils/TableGen/ClangDiagnosticsEmitter.cpp')
-rw-r--r-- | llvm/utils/TableGen/ClangDiagnosticsEmitter.cpp | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/llvm/utils/TableGen/ClangDiagnosticsEmitter.cpp b/llvm/utils/TableGen/ClangDiagnosticsEmitter.cpp index c127afd7705..6f1080eb5eb 100644 --- a/llvm/utils/TableGen/ClangDiagnosticsEmitter.cpp +++ b/llvm/utils/TableGen/ClangDiagnosticsEmitter.cpp @@ -52,15 +52,12 @@ void ClangDiagsDefsEmitter::run(raw_ostream &OS) { // Description string. OS << ", \""; - std::string S = R.getValueAsString("Text"); - EscapeString(S); - OS << S << "\""; + OS.write_escaped(R.getValueAsString("Text")) << '"'; // Warning associated with the diagnostic. if (DefInit *DI = dynamic_cast<DefInit*>(R.getValueInit("Group"))) { - S = DI->getDef()->getValueAsString("GroupName"); - EscapeString(S); - OS << ", \"" << S << "\""; + OS << ", \""; + OS.write_escaped(DI->getDef()->getValueAsString("GroupName")) << '"'; } else { OS << ", 0"; } @@ -151,11 +148,10 @@ void ClangDiagGroupsEmitter::run(raw_ostream &OS) { OS << "\n#ifdef GET_DIAG_TABLE\n"; for (std::map<std::string, GroupInfo>::iterator I = DiagsInGroup.begin(), E = DiagsInGroup.end(); I != E; ++I) { - std::string S = I->first; - EscapeString(S); // Group option string. - OS << " { \"" << S << "\"," - << std::string(MaxLen-I->first.size()+1, ' '); + OS << " { \""; + OS.write_escaped(I->first) << "\"," + << std::string(MaxLen-I->first.size()+1, ' '); // Diagnostics in the group. if (I->second.DiagsInGroup.empty()) |