summaryrefslogtreecommitdiff
path: root/tools/bugpoint/ExecutionDriver.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-08-04 00:56:43 +0000
committerChris Lattner <sabre@nondot.org>2003-08-04 00:56:43 +0000
commitca25b956f1f4440c3392eaf0351305b0c81e6124 (patch)
tree9f280b954a0d89f3e380c40376954d505f056220 /tools/bugpoint/ExecutionDriver.cpp
parent6730c8133ab01d2046c6dbe17c692f537c08c92b (diff)
downloadllvm-ca25b956f1f4440c3392eaf0351305b0c81e6124.tar.gz
llvm-ca25b956f1f4440c3392eaf0351305b0c81e6124.tar.bz2
llvm-ca25b956f1f4440c3392eaf0351305b0c81e6124.tar.xz
Make sure to flush the output stream so that we get incremental updates
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7555 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/bugpoint/ExecutionDriver.cpp')
-rw-r--r--tools/bugpoint/ExecutionDriver.cpp21
1 files changed, 10 insertions, 11 deletions
diff --git a/tools/bugpoint/ExecutionDriver.cpp b/tools/bugpoint/ExecutionDriver.cpp
index d4d18370ba..0629b3f309 100644
--- a/tools/bugpoint/ExecutionDriver.cpp
+++ b/tools/bugpoint/ExecutionDriver.cpp
@@ -111,8 +111,8 @@ int LLI::ExecuteProgram(const std::string &Bytecode,
LLIArgs.push_back(InputArgv[i].c_str());
LLIArgs.push_back(0);
- std::cout << "<lli>";
- DEBUG(std::cerr << "About to run:\n\t";
+ std::cout << "<lli>" << std::flush;
+ DEBUG(std::cerr << "\nAbout to run:\n\t";
for (unsigned i=0, e = LLIArgs.size(); i != e; ++i)
std::cerr << " " << LLIArgs[i];
std::cerr << "\n";
@@ -176,7 +176,7 @@ int GCC::ExecuteProgram(const std::string &ProgramFile,
GCCArgs.push_back("-O2"); // Optimize the program a bit...
GCCArgs.push_back(0); // NULL terminator
- std::cout << "<gcc>";
+ std::cout << "<gcc>" << std::flush;
if (RunProgramWithTimeout(GCCPath, &GCCArgs[0], "/dev/null", "/dev/null",
"/dev/null")) {
ProcessFailure(&GCCArgs[0]);
@@ -191,15 +191,14 @@ int GCC::ExecuteProgram(const std::string &ProgramFile,
ProgramArgs.push_back(0); // NULL terminator
// Now that we have a binary, run it!
- std::cout << "<program>";
- DEBUG(std::cerr << "About to run:\n\t";
+ std::cout << "<program>" << std::flush;
+ DEBUG(std::cerr << "\nAbout to run:\n\t";
for (unsigned i=0, e = ProgramArgs.size(); i != e; ++i)
std::cerr << " " << ProgramArgs[i];
std::cerr << "\n";
);
int ProgramResult = RunProgramWithTimeout(OutputBinary, &ProgramArgs[0],
InputFile, OutputFile, OutputFile);
- std::cout << "\n";
removeFile(OutputBinary);
return ProgramResult;
}
@@ -223,7 +222,7 @@ int GCC::MakeSharedObject(const std::string &InputFile,
0
};
- std::cout << "<gcc>";
+ std::cout << "<gcc>" << std::flush;
if(RunProgramWithTimeout(GCCPath, GCCArgs, "/dev/null", "/dev/null",
"/dev/null")) {
ProcessFailure(GCCArgs);
@@ -303,7 +302,7 @@ int LLC::OutputAsm(const std::string &Bytecode,
0
};
- std::cout << "<llc>";
+ std::cout << "<llc>" << std::flush;
if (RunProgramWithTimeout(LLCPath, LLCArgs, "/dev/null", "/dev/null",
"/dev/null")) {
// If LLC failed on the bytecode, print error...
@@ -374,8 +373,8 @@ int JIT::ExecuteProgram(const std::string &Bytecode,
JITArgs.push_back(InputArgv[i].c_str());
JITArgs.push_back(0);
- std::cout << "<jit>\n";
- DEBUG(std::cerr << "About to run:\n\t";
+ std::cout << "<jit>" << std::flush;
+ DEBUG(std::cerr << "\nAbout to run:\n\t";
for (unsigned i=0, e = JITArgs.size(); i != e; ++i)
std::cerr << " " << JITArgs[i];
std::cerr << "\n";
@@ -436,7 +435,7 @@ int CBE::OutputC(const std::string &Bytecode,
0
};
- std::cout << "<cbe>";
+ std::cout << "<cbe>" << std::flush;
if (RunProgramWithTimeout(DISPath, DisArgs, "/dev/null", "/dev/null",
"/dev/null")) {
// If dis failed on the bytecode, print error...