From 96ccbf68a60ef294d575b919dffdb0b6acd23eb6 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Tue, 29 May 2012 21:59:09 +0000 Subject: Pull in r156591 from upstream llvm trunk: Allow unique_file to take a mode for file permissions, but default to user only read/write. and r156592 from upstream clang trunk: For final output files create them with mode 0664 to match other compilers and expected defaults. This should fix clang creating files with mode 0600. Reported by: James MFC after: 3 days --- contrib/llvm/tools/clang/lib/Frontend/CompilerInstance.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'contrib/llvm/tools/clang/lib/Frontend/CompilerInstance.cpp') diff --git a/contrib/llvm/tools/clang/lib/Frontend/CompilerInstance.cpp b/contrib/llvm/tools/clang/lib/Frontend/CompilerInstance.cpp index 803e418e2413..4ec3ba1695a8 100644 --- a/contrib/llvm/tools/clang/lib/Frontend/CompilerInstance.cpp +++ b/contrib/llvm/tools/clang/lib/Frontend/CompilerInstance.cpp @@ -560,7 +560,8 @@ CompilerInstance::createOutputFile(StringRef OutputPath, TempPath += "-%%%%%%%%"; int fd; if (llvm::sys::fs::unique_file(TempPath.str(), fd, TempPath, - /*makeAbsolute=*/false) == llvm::errc::success) { + /*makeAbsolute=*/false, 0664) + == llvm::errc::success) { OS.reset(new llvm::raw_fd_ostream(fd, /*shouldClose=*/true)); OSFile = TempFile = TempPath.str(); } -- cgit v1.2.3