CommandInterpreter::HandleCommands should take its commands as a "const StringList &" since it doesn't modify it...

Also, don't turn on the immediate output in the temporary result, or you'll get doubled output.

llvm-svn: 127452
This commit is contained in:
Jim Ingham 2011-03-11 01:51:49 +00:00
parent e1e96027a6
commit bad87feca2
2 changed files with 2 additions and 4 deletions

View File

@ -120,7 +120,7 @@ public:
/// and failed with some explanation if we aborted executing the commands at some point.
//------------------------------------------------------------------
void
HandleCommands (StringList &commands,
HandleCommands (const StringList &commands,
ExecutionContext *context,
bool stop_on_continue,
bool stop_on_error,

View File

@ -1508,7 +1508,7 @@ CommandInterpreter::SourceInitFile (bool in_cwd, CommandReturnObject &result)
}
void
CommandInterpreter::HandleCommands (StringList &commands,
CommandInterpreter::HandleCommands (const StringList &commands,
ExecutionContext *override_context,
bool stop_on_continue,
bool stop_on_error,
@ -1548,8 +1548,6 @@ CommandInterpreter::HandleCommands (StringList &commands,
}
CommandReturnObject tmp_result;
tmp_result.SetImmediateOutputStream (result.GetImmediateOutputStream ());
tmp_result.SetImmediateErrorStream (result.GetImmediateErrorStream ());
bool success = HandleCommand(cmd, false, tmp_result, NULL);
if (print_results)