summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-cov/TestingSupport.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2018-06-07 19:58:58 +0000
committerZachary Turner <zturner@google.com>2018-06-07 19:58:58 +0000
commit1f67a3cba9b09636c56e2109d8a35ae96dc15782 (patch)
treec6ebd0cdd45f18a50b4bee970dc71809b9cb3570 /llvm/tools/llvm-cov/TestingSupport.cpp
parent84be76133282f8bd66820ca93402a741c0ee632e (diff)
downloadbcm5719-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-cov/TestingSupport.cpp')
-rw-r--r--llvm/tools/llvm-cov/TestingSupport.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/tools/llvm-cov/TestingSupport.cpp b/llvm/tools/llvm-cov/TestingSupport.cpp
index 4713d75f17d..e07abdbd17f 100644
--- a/llvm/tools/llvm-cov/TestingSupport.cpp
+++ b/llvm/tools/llvm-cov/TestingSupport.cpp
@@ -75,8 +75,7 @@ int convertForTestingMain(int argc, const char *argv[]) {
return 1;
int FD;
- if (auto Err =
- sys::fs::openFileForWrite(OutputFilename, FD, sys::fs::F_None)) {
+ if (auto Err = sys::fs::openFileForWrite(OutputFilename, FD)) {
errs() << "error: " << Err.message() << "\n";
return 1;
}
OpenPOWER on IntegriCloud