[Lldb-commits] [lldb] 29d5e27 - Only ask once if we have no commands. NFC.
Jim Ingham via lldb-commits
lldb-commits at lists.llvm.org
Wed Oct 30 18:04:11 PDT 2019
Author: Jim Ingham
Date: 2019-10-30T18:04:03-07:00
New Revision: 29d5e275f28723b3b36b00e91b535d776f5aa281
URL: https://github.com/llvm/llvm-project/commit/29d5e275f28723b3b36b00e91b535d776f5aa281
DIFF: https://github.com/llvm/llvm-project/commit/29d5e275f28723b3b36b00e91b535d776f5aa281.diff
LOG: Only ask once if we have no commands. NFC.
Added:
Modified:
lldb/source/Commands/CommandObjectBreakpoint.cpp
Removed:
################################################################################
diff --git a/lldb/source/Commands/CommandObjectBreakpoint.cpp b/lldb/source/Commands/CommandObjectBreakpoint.cpp
index 799066e07a29..5d0cc3d9dcea 100644
--- a/lldb/source/Commands/CommandObjectBreakpoint.cpp
+++ b/lldb/source/Commands/CommandObjectBreakpoint.cpp
@@ -146,15 +146,13 @@ class lldb_private::BreakpointOptionGroup : public OptionGroup {
Status OptionParsingFinished(ExecutionContext *execution_context) override {
if (!m_commands.empty()) {
- if (!m_commands.empty()) {
- auto cmd_data = std::make_unique<BreakpointOptions::CommandData>();
+ auto cmd_data = std::make_unique<BreakpointOptions::CommandData>();
- for (std::string &str : m_commands)
- cmd_data->user_source.AppendString(str);
+ for (std::string &str : m_commands)
+ cmd_data->user_source.AppendString(str);
- cmd_data->stop_on_error = true;
- m_bp_opts.SetCommandDataCallback(cmd_data);
- }
+ cmd_data->stop_on_error = true;
+ m_bp_opts.SetCommandDataCallback(cmd_data);
}
return Status();
}
More information about the lldb-commits
mailing list