]> granicus.if.org Git - clang/commit
[FileSystem] Split up the OpenFlags enumeration.
authorZachary Turner <zturner@google.com>
Thu, 7 Jun 2018 19:58:58 +0000 (19:58 +0000)
committerZachary Turner <zturner@google.com>
Thu, 7 Jun 2018 19:58:58 +0000 (19:58 +0000)
commit63624e51bdbda6731b3b4ce87ecc1789c9b85b5e
treedd4db635b400870648aa43cc1fc17407eaf7e6f5
parent6a02bc74723d0b902caff15ae176e6725922c5f4
[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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@334221 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Basic/VirtualFileSystem.cpp
lib/Driver/Driver.cpp
lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp