From f040760302ef6a1b1c14ae3e951e22abe443e08f Mon Sep 17 00:00:00 2001 From: dim <dim@FreeBSD.org> 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 <james@hicag.org> MFC after: 3 days --- contrib/llvm/lib/Support/Windows/PathV2.inc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'contrib/llvm/lib/Support/Windows/PathV2.inc') diff --git a/contrib/llvm/lib/Support/Windows/PathV2.inc b/contrib/llvm/lib/Support/Windows/PathV2.inc index e9ce5d9..3ac983a 100644 --- a/contrib/llvm/lib/Support/Windows/PathV2.inc +++ b/contrib/llvm/lib/Support/Windows/PathV2.inc @@ -487,9 +487,11 @@ handle_status_error: return error_code::success(); } +// FIXME: mode should be used here and default to user r/w only, +// it currently comes in as a UNIX mode. error_code unique_file(const Twine &model, int &result_fd, - SmallVectorImpl<char> &result_path, - bool makeAbsolute) { + SmallVectorImpl<char> &result_path, + bool makeAbsolute, unsigned mode) { // Use result_path as temp storage. result_path.set_size(0); StringRef m = model.toStringRef(result_path); -- cgit v1.1