From 96000f5c2bf99365bb45528898c864fcb1c7780b Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Wed, 9 Feb 2022 14:56:45 +0100 Subject: [PATCH] [lldb] Simplify SBCommandInterpreter::SourceInitFileInHomeDirectory just have it delegate to the new overload. --- lldb/include/lldb/Interpreter/CommandInterpreter.h | 2 +- lldb/source/API/SBCommandInterpreter.cpp | 11 +---------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/lldb/include/lldb/Interpreter/CommandInterpreter.h b/lldb/include/lldb/Interpreter/CommandInterpreter.h index 3efb59f..85eefcc 100644 --- a/lldb/include/lldb/Interpreter/CommandInterpreter.h +++ b/lldb/include/lldb/Interpreter/CommandInterpreter.h @@ -252,7 +252,7 @@ public: } void SourceInitFileCwd(CommandReturnObject &result); - void SourceInitFileHome(CommandReturnObject &result, bool is_repl = false); + void SourceInitFileHome(CommandReturnObject &result, bool is_repl); bool AddCommand(llvm::StringRef name, const lldb::CommandObjectSP &cmd_sp, bool can_replace); diff --git a/lldb/source/API/SBCommandInterpreter.cpp b/lldb/source/API/SBCommandInterpreter.cpp index 073c1a1..4a1c3c6 100644 --- a/lldb/source/API/SBCommandInterpreter.cpp +++ b/lldb/source/API/SBCommandInterpreter.cpp @@ -421,16 +421,7 @@ void SBCommandInterpreter::SourceInitFileInHomeDirectory( SBCommandReturnObject &result) { LLDB_INSTRUMENT_VA(this, result); - result.Clear(); - if (IsValid()) { - TargetSP target_sp(m_opaque_ptr->GetDebugger().GetSelectedTarget()); - std::unique_lock lock; - if (target_sp) - lock = std::unique_lock(target_sp->GetAPIMutex()); - m_opaque_ptr->SourceInitFileHome(result.ref()); - } else { - result->AppendError("SBCommandInterpreter is not valid"); - } + SourceInitFileInHomeDirectory(result, /*is_repl=*/false); } void SBCommandInterpreter::SourceInitFileInHomeDirectory( -- 2.7.4