[Lldb-commits] [lldb] r367201 - [lldb][NFC] Remove DiagnosticManager::CopyDiagnostics
Raphael Isemann via lldb-commits
lldb-commits at lists.llvm.org
Mon Jul 29 00:37:18 PDT 2019
Author: teemperor
Date: Mon Jul 29 00:37:17 2019
New Revision: 367201
URL: http://llvm.org/viewvc/llvm-project?rev=367201&view=rev
Log:
[lldb][NFC] Remove DiagnosticManager::CopyDiagnostics
The Diagnostic class in LLDB is suppossed to be inherited from,
so just copying the diagnostics like this is wrong. The function
is also unused, so lets just get rid of it instead of creating
some cloning facility for it.
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=367201&r1=367200&r2=367201&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Expression/DiagnosticManager.h (original)
+++ lldb/trunk/include/lldb/Expression/DiagnosticManager.h Mon Jul 29 00:37:17 2019
@@ -125,8 +125,6 @@ public:
m_diagnostics.push_back(diagnostic);
}
- void CopyDiagnostics(DiagnosticManager &otherDiagnostics);
-
size_t Printf(DiagnosticSeverity severity, const char *format, ...)
__attribute__((format(printf, 3, 4)));
size_t PutString(DiagnosticSeverity severity, llvm::StringRef str);
Modified: lldb/trunk/source/Expression/DiagnosticManager.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/DiagnosticManager.cpp?rev=367201&r1=367200&r2=367201&view=diff
==============================================================================
--- lldb/trunk/source/Expression/DiagnosticManager.cpp (original)
+++ lldb/trunk/source/Expression/DiagnosticManager.cpp Mon Jul 29 00:37:17 2019
@@ -77,12 +77,3 @@ size_t DiagnosticManager::PutString(Diag
AddDiagnostic(str, severity, eDiagnosticOriginLLDB);
return str.size();
}
-
-void DiagnosticManager::CopyDiagnostics(DiagnosticManager &otherDiagnostics) {
- for (const DiagnosticList::value_type &other_diagnostic:
- otherDiagnostics.Diagnostics()) {
- AddDiagnostic(
- other_diagnostic->GetMessage(), other_diagnostic->GetSeverity(),
- other_diagnostic->getKind(), other_diagnostic->GetCompilerID());
- }
-}
More information about the lldb-commits
mailing list