Fix bugpoint execution/reference output file name

sys::fs::unique_file will now loop infinitely if provided with a file name
without '%' characters and the input file already exists. As a result, bugpoint
cannot use a fixed file name for the execution output (including the reference
output).

llvm-svn: 185166
This commit is contained in:
Hal Finkel 2013-06-28 16:37:52 +00:00
parent 3b27b992ca
commit e852add40e
2 changed files with 2 additions and 2 deletions

View File

@ -191,7 +191,7 @@ public:
/// this function.
///
bool createReferenceFile(Module *M, const std::string &Filename
= "bugpoint.reference.out");
= "bugpoint.reference.out-%%%%%%%");
/// diffProgram - This method executes the specified module and diffs the
/// output against the file specified by ReferenceOutputFile. If the output

View File

@ -328,7 +328,7 @@ std::string BugDriver::executeProgram(const Module *Program,
FileRemover BitcodeFileRemover(BitcodePath,
CreatedBitcode && !SaveTemps);
if (OutputFile.empty()) OutputFile = OutputPrefix + "-execution-output";
if (OutputFile.empty()) OutputFile = OutputPrefix + "-execution-output-%%%%%%%";
// Check to see if this is a valid output filename...
SmallString<128> UniqueFile;