mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-06 09:06:21 +01:00
[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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user