[Lldb-commits] [lldb] r264478 - Removed LoggingDiagnosticConsumer, an unused class.

Sean Callanan via lldb-commits lldb-commits at lists.llvm.org
Fri Mar 25 16:51:25 PDT 2016


Author: spyffe
Date: Fri Mar 25 18:51:25 2016
New Revision: 264478

URL: http://llvm.org/viewvc/llvm-project?rev=264478&view=rev
Log:
Removed LoggingDiagnosticConsumer, an unused class.

Modified:
    lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp

Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp?rev=264478&r1=264477&r2=264478&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp (original)
+++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp Fri Mar 25 18:51:25 2016
@@ -248,56 +248,6 @@ private:
     std::shared_ptr<clang::TextDiagnosticBuffer> 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<clang::TextDiagnosticBuffer> &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<char, 32> 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<clang::TextDiagnosticBuffer> m_passthrough;
-};
-
 //===----------------------------------------------------------------------===//
 // Implementation of ClangExpressionParser
 //===----------------------------------------------------------------------===//




More information about the lldb-commits mailing list