[Lldb-commits] [lldb] r370814 - [Driver] Remove duplicate option parsing (NFC)
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Tue Sep 3 13:18:19 PDT 2019
Author: jdevlieghere
Date: Tue Sep 3 13:18:19 2019
New Revision: 370814
URL: http://llvm.org/viewvc/llvm-project?rev=370814&view=rev
Log:
[Driver] Remove duplicate option parsing (NFC)
We were checking OPT_no_use_colors three times, twice to disable colors
and once to enable debug mode. This simplifies things and now the option
is only checked once.
Modified:
lldb/trunk/tools/driver/Driver.cpp
Modified: lldb/trunk/tools/driver/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/driver/Driver.cpp?rev=370814&r1=370813&r2=370814&view=diff
==============================================================================
--- lldb/trunk/tools/driver/Driver.cpp (original)
+++ lldb/trunk/tools/driver/Driver.cpp Tue Sep 3 13:18:19 2019
@@ -229,6 +229,7 @@ SBError Driver::ProcessArgs(const opt::I
if (args.hasArg(OPT_no_use_colors)) {
m_debugger.SetUseColor(false);
+ m_option_data.m_debug_mode = true;
}
if (auto *arg = args.getLastArg(OPT_file)) {
@@ -262,14 +263,6 @@ SBError Driver::ProcessArgs(const opt::I
m_debugger.SetScriptLanguage(m_debugger.GetScriptingLanguage(arg_value));
}
- if (args.hasArg(OPT_no_use_colors)) {
- m_option_data.m_debug_mode = true;
- }
-
- if (args.hasArg(OPT_no_use_colors)) {
- m_debugger.SetUseColor(false);
- }
-
if (args.hasArg(OPT_source_quietly)) {
m_option_data.m_source_quietly = true;
}
More information about the lldb-commits
mailing list