summaryrefslogtreecommitdiff
path: root/tools/bugpoint/ExecutionDriver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/bugpoint/ExecutionDriver.cpp')
-rw-r--r--tools/bugpoint/ExecutionDriver.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/bugpoint/ExecutionDriver.cpp b/tools/bugpoint/ExecutionDriver.cpp
index ecf9dc8a58..01f7be89e3 100644
--- a/tools/bugpoint/ExecutionDriver.cpp
+++ b/tools/bugpoint/ExecutionDriver.cpp
@@ -162,6 +162,9 @@ std::string BugDriver::executeProgram(std::string OutputFile,
CreatedBytecode = true;
}
+ // Remove the temporary bytecode file when we are done.
+ FileRemover BytecodeFileRemover(BytecodeFile, CreatedBytecode);
+
if (OutputFile.empty()) OutputFile = "bugpoint-execution-output";
// Check to see if this is a valid output filename...
@@ -179,9 +182,6 @@ std::string BugDriver::executeProgram(std::string OutputFile,
if (ProgramExitedNonzero != 0)
*ProgramExitedNonzero = (RetVal != 0);
- // Remove the temporary bytecode file.
- if (CreatedBytecode) removeFile(BytecodeFile);
-
// Return the filename we captured the output to.
return OutputFile;
}