For PR351:

* Convert use of getUniqueFilename to sys::Path::makeUnique();


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18949 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Reid Spencer
2004-12-15 01:53:08 +00:00
parent cda985e191
commit 97182985d5
3 changed files with 34 additions and 20 deletions
+4 -1
View File
@@ -22,6 +22,7 @@
#include "llvm/Bytecode/WriteBytecodePass.h"
#include "llvm/Target/TargetData.h"
#include "llvm/Support/FileUtilities.h"
#include "llvm/System/Path.h"
#include <fstream>
#include <unistd.h>
#include <sys/types.h>
@@ -114,7 +115,9 @@ bool BugDriver::runPasses(const std::vector<const PassInfo*> &Passes,
std::string &OutputFilename, bool DeleteOutput,
bool Quiet) const{
std::cout << std::flush;
OutputFilename = getUniqueFilename("bugpoint-output.bc");
sys::Path uniqueFilename("bugpoint-output.bc");
uniqueFilename.makeUnique();
OutputFilename = uniqueFilename.toString();
pid_t child_pid;
switch (child_pid = fork()) {