summaryrefslogtreecommitdiffstats
path: root/llvm/tools
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools')
-rw-r--r--llvm/tools/bugpoint/ExecutionDriver.cpp6
-rw-r--r--llvm/tools/bugpoint/ExtractFunction.cpp4
-rw-r--r--llvm/tools/bugpoint/OptimizerDriver.cpp8
-rw-r--r--llvm/tools/bugpoint/ToolRunner.cpp8
-rw-r--r--llvm/tools/llvm-ar/ArchiveWriter.cpp4
5 files changed, 15 insertions, 15 deletions
diff --git a/llvm/tools/bugpoint/ExecutionDriver.cpp b/llvm/tools/bugpoint/ExecutionDriver.cpp
index 270dab23171..3d3dac3274d 100644
--- a/llvm/tools/bugpoint/ExecutionDriver.cpp
+++ b/llvm/tools/bugpoint/ExecutionDriver.cpp
@@ -267,7 +267,7 @@ void BugDriver::compileProgram(Module *M, std::string *Error) const {
// Emit the program to a bitcode file...
SmallString<128> BitcodeFile;
int BitcodeFD;
- error_code EC = sys::fs::unique_file(
+ error_code EC = sys::fs::createUniqueFile(
OutputPrefix + "-test-program-%%%%%%%.bc", BitcodeFD, BitcodeFile);
if (EC) {
errs() << ToolName << ": Error making unique filename: " << EC.message()
@@ -306,7 +306,7 @@ std::string BugDriver::executeProgram(const Module *Program,
// Emit the program to a bitcode file...
SmallString<128> UniqueFilename;
int UniqueFD;
- error_code EC = sys::fs::unique_file(
+ error_code EC = sys::fs::createUniqueFile(
OutputPrefix + "-test-program-%%%%%%%.bc", UniqueFD, UniqueFilename);
if (EC) {
errs() << ToolName << ": Error making unique filename: "
@@ -332,7 +332,7 @@ std::string BugDriver::executeProgram(const Module *Program,
// Check to see if this is a valid output filename...
SmallString<128> UniqueFile;
- error_code EC = sys::fs::unique_file(OutputFile, UniqueFile);
+ error_code EC = sys::fs::createUniqueFile(OutputFile, UniqueFile);
if (EC) {
errs() << ToolName << ": Error making unique filename: "
<< EC.message() << "\n";
diff --git a/llvm/tools/bugpoint/ExtractFunction.cpp b/llvm/tools/bugpoint/ExtractFunction.cpp
index d50f49b2db2..2098928b5c4 100644
--- a/llvm/tools/bugpoint/ExtractFunction.cpp
+++ b/llvm/tools/bugpoint/ExtractFunction.cpp
@@ -365,8 +365,8 @@ Module *BugDriver::ExtractMappedBlocksFromModule(const
Module *M) {
SmallString<128> Filename;
int FD;
- error_code EC = sys::fs::unique_file(OutputPrefix + "-extractblocks%%%%%%%",
- FD, Filename);
+ error_code EC = sys::fs::createUniqueFile(
+ OutputPrefix + "-extractblocks%%%%%%%", FD, Filename);
if (EC) {
outs() << "*** Basic Block extraction failed!\n";
errs() << "Error creating temporary file: " << EC.message() << "\n";
diff --git a/llvm/tools/bugpoint/OptimizerDriver.cpp b/llvm/tools/bugpoint/OptimizerDriver.cpp
index 43f2d3318ae..36d536ab89c 100644
--- a/llvm/tools/bugpoint/OptimizerDriver.cpp
+++ b/llvm/tools/bugpoint/OptimizerDriver.cpp
@@ -124,8 +124,8 @@ bool BugDriver::runPasses(Module *Program,
// setup the output file name
outs().flush();
SmallString<128> UniqueFilename;
- error_code EC =
- sys::fs::unique_file(OutputPrefix + "-output-%%%%%%%.bc", UniqueFilename);
+ error_code EC = sys::fs::createUniqueFile(
+ OutputPrefix + "-output-%%%%%%%.bc", UniqueFilename);
if (EC) {
errs() << getToolName() << ": Error making unique filename: "
<< EC.message() << "\n";
@@ -136,8 +136,8 @@ bool BugDriver::runPasses(Module *Program,
// set up the input file name
SmallString<128> InputFilename;
int InputFD;
- EC = sys::fs::unique_file(OutputPrefix + "-input-%%%%%%%.bc", InputFD,
- InputFilename);
+ EC = sys::fs::createUniqueFile(OutputPrefix + "-input-%%%%%%%.bc", InputFD,
+ InputFilename);
if (EC) {
errs() << getToolName() << ": Error making unique filename: "
<< EC.message() << "\n";
diff --git a/llvm/tools/bugpoint/ToolRunner.cpp b/llvm/tools/bugpoint/ToolRunner.cpp
index bec00364d7c..107d0dbaeb1 100644
--- a/llvm/tools/bugpoint/ToolRunner.cpp
+++ b/llvm/tools/bugpoint/ToolRunner.cpp
@@ -478,7 +478,7 @@ GCC::FileType LLC::OutputCode(const std::string &Bitcode,
SmallString<128> UniqueFile;
error_code EC =
- sys::fs::unique_file(Bitcode + "-%%%%%%%" + Suffix, UniqueFile);
+ sys::fs::createUniqueFile(Bitcode + "-%%%%%%%" + Suffix, UniqueFile);
if (EC) {
errs() << "Error making unique filename: " << EC.message() << "\n";
exit(1);
@@ -715,7 +715,7 @@ int GCC::ExecuteProgram(const std::string &ProgramFile,
SmallString<128> OutputBinary;
error_code EC =
- sys::fs::unique_file(ProgramFile+ "-%%%%%%%.gcc.exe", OutputBinary);
+ sys::fs::createUniqueFile(ProgramFile + "-%%%%%%%.gcc.exe", OutputBinary);
if (EC) {
errs() << "Error making unique filename: " << EC.message() << "\n";
exit(1);
@@ -824,8 +824,8 @@ int GCC::MakeSharedObject(const std::string &InputFile, FileType fileType,
const std::vector<std::string> &ArgsForGCC,
std::string &Error) {
SmallString<128> UniqueFilename;
- error_code EC = sys::fs::unique_file(InputFile + "-%%%%%%%" + LTDL_SHLIB_EXT,
- UniqueFilename);
+ error_code EC = sys::fs::createUniqueFile(
+ InputFile + "-%%%%%%%" + LTDL_SHLIB_EXT, UniqueFilename);
if (EC) {
errs() << "Error making unique filename: " << EC.message() << "\n";
exit(1);
diff --git a/llvm/tools/llvm-ar/ArchiveWriter.cpp b/llvm/tools/llvm-ar/ArchiveWriter.cpp
index 048748a3c9c..52ce045c16c 100644
--- a/llvm/tools/llvm-ar/ArchiveWriter.cpp
+++ b/llvm/tools/llvm-ar/ArchiveWriter.cpp
@@ -260,8 +260,8 @@ bool Archive::writeToDisk(bool TruncateNames, std::string *ErrMsg) {
// Create a temporary file to store the archive in
int TmpArchiveFD;
SmallString<128> TmpArchive;
- error_code EC = sys::fs::unique_file("temp-archive-%%%%%%%.a", TmpArchiveFD,
- TmpArchive, true, sys::fs::all_read | sys::fs::all_write);
+ error_code EC = sys::fs::createUniqueFile("temp-archive-%%%%%%%.a",
+ TmpArchiveFD, TmpArchive);
if (EC)
return true;
OpenPOWER on IntegriCloud