[lldb] Remove undocumented return value from DiagnosticManager::PutString

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
This commit is contained in:
Raphael Isemann 2019-08-12 14:11:37 +00:00
parent f927b34a14
commit 8940687c6d
2 changed files with 4 additions and 5 deletions

View File

@ -127,7 +127,7 @@ public:
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()) {

View File

@ -70,10 +70,9 @@ size_t DiagnosticManager::Printf(DiagnosticSeverity severity,
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();
}