From 822c58704bc8a1432e1f207d00de1c1f7bd7d0da Mon Sep 17 00:00:00 2001 From: Raphael Isemann Date: Mon, 29 Jul 2019 07:37:17 +0000 Subject: [PATCH] [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. llvm-svn: 367201 --- lldb/include/lldb/Expression/DiagnosticManager.h | 2 -- lldb/source/Expression/DiagnosticManager.cpp | 9 --------- 2 files changed, 11 deletions(-) diff --git a/lldb/include/lldb/Expression/DiagnosticManager.h b/lldb/include/lldb/Expression/DiagnosticManager.h index 557b941..472ae0e 100644 --- a/lldb/include/lldb/Expression/DiagnosticManager.h +++ b/lldb/include/lldb/Expression/DiagnosticManager.h @@ -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); diff --git a/lldb/source/Expression/DiagnosticManager.cpp b/lldb/source/Expression/DiagnosticManager.cpp index 53d85f8a..b258ede 100644 --- a/lldb/source/Expression/DiagnosticManager.cpp +++ b/lldb/source/Expression/DiagnosticManager.cpp @@ -77,12 +77,3 @@ size_t DiagnosticManager::PutString(DiagnosticSeverity severity, 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()); - } -} -- 2.7.4