teemperor updated this revision to Diff 227438. teemperor added a comment. - Uploaded full diff.
CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69710/new/ https://reviews.llvm.org/D69710 Files: lldb/include/lldb/Expression/ExpressionParser.h lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h lldb/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.cpp Index: lldb/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.cpp =================================================================== --- lldb/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.cpp +++ lldb/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.cpp @@ -186,10 +186,10 @@ lldb::ProcessSP jit_process_sp(m_jit_process_wp.lock()); if (jit_process_sp) { const bool generate_debug_info = true; - m_parser.reset(new ClangExpressionParser(jit_process_sp.get(), *this, - generate_debug_info)); - - num_errors = m_parser->Parse(diagnostic_manager); + auto *clang_parser = new ClangExpressionParser(jit_process_sp.get(), *this, + generate_debug_info); + num_errors = clang_parser->Parse(diagnostic_manager); + m_parser.reset(clang_parser); } else { diagnostic_manager.PutString(eDiagnosticSeverityError, "no process - unable to inject function"); Index: lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h =================================================================== --- lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h +++ lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h @@ -77,7 +77,7 @@ /// \return /// The number of errors encountered during parsing. 0 means /// success. - unsigned Parse(DiagnosticManager &diagnostic_manager) override; + unsigned Parse(DiagnosticManager &diagnostic_manager); bool RewriteExpression(DiagnosticManager &diagnostic_manager) override; Index: lldb/include/lldb/Expression/ExpressionParser.h =================================================================== --- lldb/include/lldb/Expression/ExpressionParser.h +++ lldb/include/lldb/Expression/ExpressionParser.h @@ -76,17 +76,6 @@ virtual bool Complete(CompletionRequest &request, unsigned line, unsigned pos, unsigned typed_pos) = 0; - /// Parse a single expression and convert it to IR using Clang. Don't wrap - /// the expression in anything at all. - /// - /// \param[in] diagnostic_manager - /// The diagnostic manager in which to store the errors and warnings. - /// - /// \return - /// The number of errors encountered during parsing. 0 means - /// success. - virtual unsigned Parse(DiagnosticManager &diagnostic_manager) = 0; - /// Try to use the FixIts in the diagnostic_manager to rewrite the /// expression. If successful, the rewritten expression is stored in the /// diagnostic_manager, get it out with GetFixedExpression.
Index: lldb/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.cpp =================================================================== --- lldb/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.cpp +++ lldb/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.cpp @@ -186,10 +186,10 @@ lldb::ProcessSP jit_process_sp(m_jit_process_wp.lock()); if (jit_process_sp) { const bool generate_debug_info = true; - m_parser.reset(new ClangExpressionParser(jit_process_sp.get(), *this, - generate_debug_info)); - - num_errors = m_parser->Parse(diagnostic_manager); + auto *clang_parser = new ClangExpressionParser(jit_process_sp.get(), *this, + generate_debug_info); + num_errors = clang_parser->Parse(diagnostic_manager); + m_parser.reset(clang_parser); } else { diagnostic_manager.PutString(eDiagnosticSeverityError, "no process - unable to inject function"); Index: lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h =================================================================== --- lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h +++ lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h @@ -77,7 +77,7 @@ /// \return /// The number of errors encountered during parsing. 0 means /// success. - unsigned Parse(DiagnosticManager &diagnostic_manager) override; + unsigned Parse(DiagnosticManager &diagnostic_manager); bool RewriteExpression(DiagnosticManager &diagnostic_manager) override; Index: lldb/include/lldb/Expression/ExpressionParser.h =================================================================== --- lldb/include/lldb/Expression/ExpressionParser.h +++ lldb/include/lldb/Expression/ExpressionParser.h @@ -76,17 +76,6 @@ virtual bool Complete(CompletionRequest &request, unsigned line, unsigned pos, unsigned typed_pos) = 0; - /// Parse a single expression and convert it to IR using Clang. Don't wrap - /// the expression in anything at all. - /// - /// \param[in] diagnostic_manager - /// The diagnostic manager in which to store the errors and warnings. - /// - /// \return - /// The number of errors encountered during parsing. 0 means - /// success. - virtual unsigned Parse(DiagnosticManager &diagnostic_manager) = 0; - /// Try to use the FixIts in the diagnostic_manager to rewrite the /// expression. If successful, the rewritten expression is stored in the /// diagnostic_manager, get it out with GetFixedExpression.
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits