summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/tools/clang/lib/Frontend
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2012-05-29 21:59:09 +0000
committerdim <dim@FreeBSD.org>2012-05-29 21:59:09 +0000
commitf040760302ef6a1b1c14ae3e951e22abe443e08f (patch)
tree12014da887ddbaddee1e78c4b43cc23a2f9afedc /contrib/llvm/tools/clang/lib/Frontend
parent3d7265cd8102879c148defab187a106d71ed3b6d (diff)
downloadFreeBSD-src-f040760302ef6a1b1c14ae3e951e22abe443e08f.zip
FreeBSD-src-f040760302ef6a1b1c14ae3e951e22abe443e08f.tar.gz
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 <james@hicag.org> MFC after: 3 days
Diffstat (limited to 'contrib/llvm/tools/clang/lib/Frontend')
-rw-r--r--contrib/llvm/tools/clang/lib/Frontend/CompilerInstance.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/llvm/tools/clang/lib/Frontend/CompilerInstance.cpp b/contrib/llvm/tools/clang/lib/Frontend/CompilerInstance.cpp
index 803e418..4ec3ba1 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();
}
OpenPOWER on IntegriCloud