Author: teemperor Date: Mon Aug 12 07:11:37 2019 New Revision: 368577 URL: http://llvm.org/viewvc/llvm-project?rev=368577&view=rev Log: [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). Modified: lldb/trunk/include/lldb/Expression/DiagnosticManager.h lldb/trunk/source/Expression/DiagnosticManager.cpp Modified: lldb/trunk/include/lldb/Expression/DiagnosticManager.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Expression/DiagnosticManager.h?rev=368577&r1=368576&r2=368577&view=diff ============================================================================== --- lldb/trunk/include/lldb/Expression/DiagnosticManager.h (original) +++ lldb/trunk/include/lldb/Expression/DiagnosticManager.h Mon Aug 12 07:11:37 2019 @@ -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()) { Modified: lldb/trunk/source/Expression/DiagnosticManager.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/DiagnosticManager.cpp?rev=368577&r1=368576&r2=368577&view=diff ============================================================================== --- lldb/trunk/source/Expression/DiagnosticManager.cpp (original) +++ lldb/trunk/source/Expression/DiagnosticManager.cpp Mon Aug 12 07:11:37 2019 @@ -70,10 +70,9 @@ size_t DiagnosticManager::Printf(Diagnos 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(); } _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits