summaryrefslogtreecommitdiffstats
path: root/llvm/tools/bugpoint
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2014-10-07 21:47:23 +0000
committerLang Hames <lhames@gmail.com>2014-10-07 21:47:23 +0000
commit2959356958c7f265c55d98e962e61af623773d44 (patch)
tree3b133d5a3190cfe15039836fa9ecc5c9482c02a7 /llvm/tools/bugpoint
parenta2a481e0e3a2a7c59a990b17cb82b3ddea1bceae (diff)
downloadbcm5719-llvm-2959356958c7f265c55d98e962e61af623773d44.tar.gz
bcm5719-llvm-2959356958c7f265c55d98e962e61af623773d44.zip
[Bugpoint] Close error log in ProcessFailure. Bugpoint had been failing to close
this, and in some circumstances (e.g. reducing particularly large test-cases) this was causing bugpoint to be killed for hitting open file-handle limits. No test case: I was only able to trigger this with test cases taking upwards of 10 mins to run. llvm-svn: 219244
Diffstat (limited to 'llvm/tools/bugpoint')
-rw-r--r--llvm/tools/bugpoint/ToolRunner.cpp10
1 files changed, 1 insertions, 9 deletions
diff --git a/llvm/tools/bugpoint/ToolRunner.cpp b/llvm/tools/bugpoint/ToolRunner.cpp
index a28b2856f1e..bdbcffbe926 100644
--- a/llvm/tools/bugpoint/ToolRunner.cpp
+++ b/llvm/tools/bugpoint/ToolRunner.cpp
@@ -141,21 +141,13 @@ static std::string ProcessFailure(StringRef ProgPath, const char** Args,
// Rerun the compiler, capturing any error messages to print them.
SmallString<128> ErrorFilename;
- int ErrorFD;
std::error_code EC = sys::fs::createTemporaryFile(
- "bugpoint.program_error_messages", "", ErrorFD, ErrorFilename);
+ "bugpoint.program_error_messages", "", ErrorFilename);
if (EC) {
errs() << "Error making unique filename: " << EC.message() << "\n";
exit(1);
}
-#ifdef _WIN32
- // Close ErrorFD immediately, or it couldn't be reopened on Win32.
- // FIXME: We may have an option in openFileForWrite(), not to use ResultFD
- // but to close it.
- delete new raw_fd_ostream(ErrorFD, true);
-#endif
-
RunProgramWithTimeout(ProgPath, Args, "", ErrorFilename.str(),
ErrorFilename.str(), Timeout, MemoryLimit);
// FIXME: check return code ?
OpenPOWER on IntegriCloud