The returned value is currently unused. It also seems to imply that
it somehow represents 'printf-style' the number of characters/bytes
written to some output stream (which is incorrect, as we only know
the actual size of the written message when we have rendered it,
e.g. via GetString and DiagnosticManagers have no associated
output stream).
llvm-svn: 368577
size_t Printf(DiagnosticSeverity severity, const char *format, ...)
__attribute__((format(printf, 3, 4)));
- size_t PutString(DiagnosticSeverity severity, llvm::StringRef str);
+ void PutString(DiagnosticSeverity severity, llvm::StringRef str);
void AppendMessageToDiagnostic(llvm::StringRef str) {
if (!m_diagnostics.empty()) {
return result;
}
-size_t DiagnosticManager::PutString(DiagnosticSeverity severity,
- llvm::StringRef str) {
+void DiagnosticManager::PutString(DiagnosticSeverity severity,
+ llvm::StringRef str) {
if (str.empty())
- return 0;
+ return;
AddDiagnostic(str, severity, eDiagnosticOriginLLDB);
- return str.size();
}