Skip to content

Commit 93fc5fe

Browse files
committed
Merge commit 'refs/am/changes/8587cc5076494e4300be1a20d63e44e895413d0e_swift/master-next' into HEAD
2 parents c561f8d + 8587cc5 commit 93fc5fe

File tree

3 files changed

+5
-20
lines changed

3 files changed

+5
-20
lines changed

lldb/include/lldb/Expression/ExpressionParser.h

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -76,19 +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,
89-
uint32_t first_line = 0,
90-
uint32_t last_line = UINT32_MAX) = 0;
91-
9279
/// Try to use the FixIts in the diagnostic_manager to rewrite the
9380
/// expression. If successful, the rewritten expression is stored in the
9481
/// diagnostic_manager, get it out with GetFixedExpression.

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,7 @@ class ClangExpressionParser : public ExpressionParser {
7777
/// \return
7878
/// The number of errors encountered during parsing. 0 means
7979
/// success.
80-
//------------------------------------------------------------------
81-
unsigned Parse(DiagnosticManager &diagnostic_manager, uint32_t first_line = 0,
82-
uint32_t last_line = UINT32_MAX) override;
80+
unsigned Parse(DiagnosticManager &diagnostic_manager);
8381

8482
bool RewriteExpression(DiagnosticManager &diagnostic_manager) override;
8583

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)