summaryrefslogtreecommitdiff
path: root/tools/llvm-ar
diff options
context:
space:
mode:
Diffstat (limited to 'tools/llvm-ar')
-rw-r--r--tools/llvm-ar/ArchiveWriter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/llvm-ar/ArchiveWriter.cpp b/tools/llvm-ar/ArchiveWriter.cpp
index 048748a3c9..52ce045c16 100644
--- a/tools/llvm-ar/ArchiveWriter.cpp
+++ b/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;