From ed963704f5371835efde99bea9333de05e73deac Mon Sep 17 00:00:00 2001 From: Sean Callanan Date: Fri, 25 Mar 2016 23:51:25 +0000 Subject: [PATCH] Removed LoggingDiagnosticConsumer, an unused class. llvm-svn: 264478 --- .../Clang/ClangExpressionParser.cpp | 50 ---------------------- 1 file changed, 50 deletions(-) diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp index 3a97194..21dfcc2 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp +++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp @@ -248,56 +248,6 @@ private: std::shared_ptr m_passthrough; }; -class LoggingDiagnosticConsumer : public clang::DiagnosticConsumer -{ -public: - LoggingDiagnosticConsumer () - { - m_log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS); - m_passthrough.reset(new clang::TextDiagnosticBuffer); - } - - LoggingDiagnosticConsumer (const std::shared_ptr &passthrough) - { - m_log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS); - m_passthrough = passthrough; - } - - void HandleDiagnostic (DiagnosticsEngine::Level DiagLevel, const clang::Diagnostic &Info) - { - if (m_log) - { - llvm::SmallVector diag_str; - Info.FormatDiagnostic(diag_str); - diag_str.push_back('\0'); - const char *data = diag_str.data(); - m_log->Printf("[clang] COMPILER DIAGNOSTIC: %s", data); - - lldbassert(Info.getID() != clang::diag::err_unsupported_ast_node && "'log enable lldb expr' to investigate."); - } - - m_passthrough->HandleDiagnostic(DiagLevel, Info); - } - - void FlushDiagnostics (DiagnosticsEngine &Diags) - { - m_passthrough->FlushDiagnostics(Diags); - } - - DiagnosticConsumer *clone (DiagnosticsEngine &Diags) const - { - return new LoggingDiagnosticConsumer (m_passthrough); - } - - clang::TextDiagnosticBuffer *GetPassthrough() - { - return m_passthrough.get(); - } -private: - Log * m_log; - std::shared_ptr m_passthrough; -}; - //===----------------------------------------------------------------------===// // Implementation of ClangExpressionParser //===----------------------------------------------------------------------===// -- 2.7.4