diff options
author | Zachary Turner <zturner@google.com> | 2018-06-07 19:58:58 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2018-06-07 19:58:58 +0000 |
commit | 1f67a3cba9b09636c56e2109d8a35ae96dc15782 (patch) | |
tree | c6ebd0cdd45f18a50b4bee970dc71809b9cb3570 /llvm/tools/llvm-rc/llvm-rc.cpp | |
parent | 84be76133282f8bd66820ca93402a741c0ee632e (diff) | |
download | bcm5719-llvm-1f67a3cba9b09636c56e2109d8a35ae96dc15782.tar.gz bcm5719-llvm-1f67a3cba9b09636c56e2109d8a35ae96dc15782.zip |
[FileSystem] Split up the OpenFlags enumeration.
This breaks the OpenFlags enumeration into two separate
enumerations: OpenFlags and CreationDisposition. The first
controls the behavior of the API depending on whether or not
the target file already exists, and is not a flags-based
enum. The second controls more flags-like values.
This yields a more easy to understand API, while also allowing
flags to be passed to the openForRead api, where most of the
values didn't make sense before. This also makes the apis more
testable as it becomes easy to enumerate all the configurations
which make sense, so I've added many new tests to exercise all
the different values.
llvm-svn: 334221
Diffstat (limited to 'llvm/tools/llvm-rc/llvm-rc.cpp')
-rw-r--r-- | llvm/tools/llvm-rc/llvm-rc.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/tools/llvm-rc/llvm-rc.cpp b/llvm/tools/llvm-rc/llvm-rc.cpp index 41360d2a7bd..0448f4519b4 100644 --- a/llvm/tools/llvm-rc/llvm-rc.cpp +++ b/llvm/tools/llvm-rc/llvm-rc.cpp @@ -171,8 +171,8 @@ int main(int Argc, const char **Argv) { "No more than one output file should be provided (using /FO flag)."); std::error_code EC; - auto FOut = - llvm::make_unique<raw_fd_ostream>(OutArgsInfo[0], EC, sys::fs::F_RW); + auto FOut = llvm::make_unique<raw_fd_ostream>( + OutArgsInfo[0], EC, sys::fs::FA_Read | sys::fs::FA_Write); if (EC) fatalError("Error opening output file '" + OutArgsInfo[0] + "': " + EC.message()); |