diff options
| author | Jonas Devlieghere <jonas@devlieghere.com> | 2019-09-03 20:18:19 +0000 |
|---|---|---|
| committer | Jonas Devlieghere <jonas@devlieghere.com> | 2019-09-03 20:18:19 +0000 |
| commit | a0a2ca67fef723968266a33b6824f1948464193a (patch) | |
| tree | 013d5a980d028b3f35cc7a2f694dba9d577bef30 /lldb/tools | |
| parent | b0eb394417a723c30ea7be549e6f253771a889c7 (diff) | |
| download | bcm5719-llvm-a0a2ca67fef723968266a33b6824f1948464193a.tar.gz bcm5719-llvm-a0a2ca67fef723968266a33b6824f1948464193a.zip | |
[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.
llvm-svn: 370814
Diffstat (limited to 'lldb/tools')
| -rw-r--r-- | lldb/tools/driver/Driver.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/lldb/tools/driver/Driver.cpp b/lldb/tools/driver/Driver.cpp index 043aba7b07b..ec70784457d 100644 --- a/lldb/tools/driver/Driver.cpp +++ b/lldb/tools/driver/Driver.cpp @@ -229,6 +229,7 @@ SBError Driver::ProcessArgs(const opt::InputArgList &args, bool &exiting) { 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::InputArgList &args, bool &exiting) { 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; } |

