[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
This commit is contained in:
Jonas Devlieghere
2019-09-03 20:18:19 +00:00
parent b0eb394417
commit a0a2ca67fe
+1 -8
View File
@@ -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;
}