Lines Matching refs:OS
19 LogDiagnosticPrinter::LogDiagnosticPrinter(raw_ostream &os,
22 : OS(os), LangOpts(0), DiagOpts(diags),
28 delete &OS;
43 static void emitString(llvm::raw_svector_ostream &OS, const StringRef Raw) {
47 default: OS << c; break;
48 case '&': OS << "&"; break;
49 case '<': OS << "<"; break;
50 case '>': OS << ">"; break;
51 case '\'': OS << "'"; break;
52 case '\"': OS << """; break;
69 llvm::raw_svector_ostream OS(Msg);
71 OS << "<dict>\n";
73 OS << " <key>main-file</key>\n"
75 emitString(OS, MainFilename);
76 OS << "</string>\n";
79 OS << " <key>dwarf-debug-flags</key>\n"
81 emitString(OS, DwarfDebugFlags);
82 OS << "</string>\n";
84 OS << " <key>diagnostics</key>\n";
85 OS << " <array>\n";
89 OS << " <dict>\n";
90 OS << " <key>level</key>\n"
92 emitString(OS, getLevelName(DE.DiagnosticLevel));
93 OS << "</string>\n";
95 OS << " <key>filename</key>\n"
97 emitString(OS, DE.Filename);
98 OS << "</string>\n";
101 OS << " <key>line</key>\n"
105 OS << " <key>column</key>\n"
109 OS << " <key>message</key>\n"
111 emitString(OS, DE.Message);
112 OS << "</string>\n";
114 OS << " </dict>\n";
116 OS << " </array>\n";
117 OS << "</dict>\n";
119 this->OS << OS.str();
176 return new LogDiagnosticPrinter(OS, &*DiagOpts, /*OwnsOutputStream=*/false);