From 57179860a0547afc482171ef304976c7761a3fd8 Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Sat, 27 Apr 2019 06:19:42 +0000 Subject: [CommandObject] Use GetDebugger() helper method (NFC) In r359354 a GetDebugger() method was added to the CommandObject class, so that we didn't have to go through the command interpreter to obtain the script interpreter. This patch simplifies other call sites where m_interpreter.GetDebugger() was used, and replaces them with a shorter call to the new method. llvm-svn: 359373 --- lldb/source/Commands/CommandObjectSource.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lldb/source/Commands/CommandObjectSource.cpp') diff --git a/lldb/source/Commands/CommandObjectSource.cpp b/lldb/source/Commands/CommandObjectSource.cpp index 2afb012f..1b515d0 100644 --- a/lldb/source/Commands/CommandObjectSource.cpp +++ b/lldb/source/Commands/CommandObjectSource.cpp @@ -572,7 +572,7 @@ protected: Target *target = m_exe_ctx.GetTargetPtr(); if (target == nullptr) { - target = m_interpreter.GetDebugger().GetSelectedTarget().get(); + target = GetDebugger().GetSelectedTarget().get(); if (target == nullptr) { result.AppendError("invalid target, create a debug target using the " "'target create' command."); @@ -1132,8 +1132,7 @@ protected: m_options.num_lines >= 10 ? 5 : m_options.num_lines / 2; const uint32_t column = - (m_interpreter.GetDebugger().GetStopShowColumn() != - eStopShowColumnNone) + (GetDebugger().GetStopShowColumn() != eStopShowColumnNone) ? sc.line_entry.column : 0; target->GetSourceManager().DisplaySourceLinesWithLineNumbers( -- cgit v1.1