Skip to content

Commit 8587cc5

Browse files
author
git apple-llvm automerger
committed
Merge commit '25b486ac4f33' from llvm.org/master into apple/master
2 parents 99c8d49 + 25b486a commit 8587cc5

File tree

3 files changed

+5
-16
lines changed

3 files changed

+5
-16
lines changed

lldb/include/lldb/Expression/ExpressionParser.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -76,17 +76,6 @@ class ExpressionParser {
7676
virtual bool Complete(CompletionRequest &request, unsigned line, unsigned pos,
7777
unsigned typed_pos) = 0;
7878

79-
/// Parse a single expression and convert it to IR using Clang. Don't wrap
80-
/// the expression in anything at all.
81-
///
82-
/// \param[in] diagnostic_manager
83-
/// The diagnostic manager in which to store the errors and warnings.
84-
///
85-
/// \return
86-
/// The number of errors encountered during parsing. 0 means
87-
/// success.
88-
virtual unsigned Parse(DiagnosticManager &diagnostic_manager) = 0;
89-
9079
/// Try to use the FixIts in the diagnostic_manager to rewrite the
9180
/// expression. If successful, the rewritten expression is stored in the
9281
/// diagnostic_manager, get it out with GetFixedExpression.

lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class ClangExpressionParser : public ExpressionParser {
7777
/// \return
7878
/// The number of errors encountered during parsing. 0 means
7979
/// success.
80-
unsigned Parse(DiagnosticManager &diagnostic_manager) override;
80+
unsigned Parse(DiagnosticManager &diagnostic_manager);
8181

8282
bool RewriteExpression(DiagnosticManager &diagnostic_manager) override;
8383

lldb/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -186,10 +186,10 @@ ClangFunctionCaller::CompileFunction(lldb::ThreadSP thread_to_use_sp,
186186
lldb::ProcessSP jit_process_sp(m_jit_process_wp.lock());
187187
if (jit_process_sp) {
188188
const bool generate_debug_info = true;
189-
m_parser.reset(new ClangExpressionParser(jit_process_sp.get(), *this,
190-
generate_debug_info));
191-
192-
num_errors = m_parser->Parse(diagnostic_manager);
189+
auto *clang_parser = new ClangExpressionParser(jit_process_sp.get(), *this,
190+
generate_debug_info);
191+
num_errors = clang_parser->Parse(diagnostic_manager);
192+
m_parser.reset(clang_parser);
193193
} else {
194194
diagnostic_manager.PutString(eDiagnosticSeverityError,
195195
"no process - unable to inject function");

0 commit comments

Comments
 (0)