summaryrefslogtreecommitdiff
path: root/lib/Serialization/GlobalModuleIndex.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-07-05 21:13:58 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-07-05 21:13:58 +0000
commit70e7aeccbf5856a84f81366c6c1a0c0c01e70063 (patch)
tree28e6bfdbcffbb45f57e27d95789cc715217e70fe /lib/Serialization/GlobalModuleIndex.cpp
parent66e8c6786c4d29e76fcbc213731cf35833e230c0 (diff)
downloadclang-70e7aeccbf5856a84f81366c6c1a0c0c01e70063.tar.gz
clang-70e7aeccbf5856a84f81366c6c1a0c0c01e70063.tar.bz2
clang-70e7aeccbf5856a84f81366c6c1a0c0c01e70063.tar.xz
Use llvm::sys::fs::createUniqueFile.
Include a test that clang now produces output files with permissions matching the umask. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185727 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Serialization/GlobalModuleIndex.cpp')
-rw-r--r--lib/Serialization/GlobalModuleIndex.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Serialization/GlobalModuleIndex.cpp b/lib/Serialization/GlobalModuleIndex.cpp
index 5413d385dd..675804efd1 100644
--- a/lib/Serialization/GlobalModuleIndex.cpp
+++ b/lib/Serialization/GlobalModuleIndex.cpp
@@ -790,7 +790,8 @@ GlobalModuleIndex::writeIndex(FileManager &FileMgr, StringRef Path) {
// Write the global index file to a temporary file.
llvm::SmallString<128> IndexTmpPath;
int TmpFD;
- if (llvm::sys::fs::unique_file(IndexPath + "-%%%%%%%%", TmpFD, IndexTmpPath))
+ if (llvm::sys::fs::createUniqueFile(IndexPath + "-%%%%%%%%", TmpFD,
+ IndexTmpPath))
return EC_IOError;
// Open the temporary global index file for output.