diff options
| author | 2019-01-27 16:42:12 +0000 | |
|---|---|---|
| committer | 2019-01-27 16:42:12 +0000 | |
| commit | b773203fb58f3ef282fb69c832d8710cab5bc82d (patch) | |
| tree | e75913f147570fbd75169647b144df85b88a038c /gnu/llvm/lib/Support/TarWriter.cpp | |
| parent | tweak errno in previous (diff) | |
| download | wireguard-openbsd-b773203fb58f3ef282fb69c832d8710cab5bc82d.tar.xz wireguard-openbsd-b773203fb58f3ef282fb69c832d8710cab5bc82d.zip | |
Import LLVM 7.0.1 release including clang, lld and lldb.
Diffstat (limited to 'gnu/llvm/lib/Support/TarWriter.cpp')
| -rw-r--r-- | gnu/llvm/lib/Support/TarWriter.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gnu/llvm/lib/Support/TarWriter.cpp b/gnu/llvm/lib/Support/TarWriter.cpp index abc46d07657..5b4d554befe 100644 --- a/gnu/llvm/lib/Support/TarWriter.cpp +++ b/gnu/llvm/lib/Support/TarWriter.cpp @@ -159,8 +159,10 @@ static void writeUstarHeader(raw_fd_ostream &OS, StringRef Prefix, // Creates a TarWriter instance and returns it. Expected<std::unique_ptr<TarWriter>> TarWriter::create(StringRef OutputPath, StringRef BaseDir) { + using namespace sys::fs; int FD; - if (std::error_code EC = openFileForWrite(OutputPath, FD, sys::fs::F_None)) + if (std::error_code EC = + openFileForWrite(OutputPath, FD, CD_CreateAlways, OF_None)) return make_error<StringError>("cannot open " + OutputPath, EC); return std::unique_ptr<TarWriter>(new TarWriter(FD, BaseDir)); } |
