forked from OSchip/llvm-project
[lldb] Make Target* a Target& in CommandObjectExpression::DoExecute REPL logic
Subscribers: JDevlieghere, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D70002
This commit is contained in:
parent
79b3cce7f1
commit
5a1bac4d1d
|
@ -589,13 +589,12 @@ bool CommandObjectExpression::DoExecute(llvm::StringRef command,
|
|||
return false;
|
||||
|
||||
if (m_repl_option.GetOptionValue().GetCurrentValue()) {
|
||||
Target *target = m_interpreter.GetExecutionContext().GetTargetPtr();
|
||||
if (target) {
|
||||
Target &target = GetSelectedOrDummyTarget();
|
||||
// Drop into REPL
|
||||
m_expr_lines.clear();
|
||||
m_expr_line_count = 0;
|
||||
|
||||
Debugger &debugger = target->GetDebugger();
|
||||
Debugger &debugger = target.GetDebugger();
|
||||
|
||||
// Check if the LLDB command interpreter is sitting on top of a REPL
|
||||
// that launched it...
|
||||
|
@ -610,12 +609,12 @@ bool CommandObjectExpression::DoExecute(llvm::StringRef command,
|
|||
// interpreter, so just push one
|
||||
bool initialize = false;
|
||||
Status repl_error;
|
||||
REPLSP repl_sp(target->GetREPL(repl_error, m_command_options.language,
|
||||
REPLSP repl_sp(target.GetREPL(repl_error, m_command_options.language,
|
||||
nullptr, false));
|
||||
|
||||
if (!repl_sp) {
|
||||
initialize = true;
|
||||
repl_sp = target->GetREPL(repl_error, m_command_options.language,
|
||||
repl_sp = target.GetREPL(repl_error, m_command_options.language,
|
||||
nullptr, true);
|
||||
if (!repl_error.Success()) {
|
||||
result.SetError(repl_error);
|
||||
|
@ -645,7 +644,6 @@ bool CommandObjectExpression::DoExecute(llvm::StringRef command,
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// No expression following options
|
||||
else if (expr.empty()) {
|
||||
GetMultilineExpression();
|
||||
|
|
Loading…
Reference in New Issue