[Lldb-commits] [PATCH] D69710: [lldb][NFC] Remove unused ExpressionParser::Parse

Raphael Isemann via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Nov 1 06:35:33 PDT 2019


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.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69710.227438.patch
Type: text/x-patch
Size: 2659 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20191101/44c05f78/attachment.bin>


More information about the lldb-commits mailing list