summaryrefslogtreecommitdiff
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2019-08-26 18:29:51 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2019-08-26 18:29:51 +0000
commitc2b43094158a8d126ba0c9a1b9f22a160ccde194 (patch)
treecfe82fef32e734991ee5299cc8fa8c4c67a195df /lib/CodeGen
parentd2dd77a2da6b7bc2a1e54cf654413f0fca4e7510 (diff)
downloadclang-c2b43094158a8d126ba0c9a1b9f22a160ccde194.tar.gz
FileManager: Use llvm::Expected in new getFileRef API
`FileManager::getFileRef` is a modern API which we expect to convert to over time. We should modernize the error handling as well, using `llvm::Expected` instead of `llvm::ErrorOr`, to help clients that care about errors to ensure nothing is missed. However, not all clients care. I've also added another path for those that don't: - `FileEntryRef` is now copy- and move-assignable (using a pointer instead of a reference). - `FileManager::getOptionalFileRef` returns an `llvm::Optional` instead of `llvm::Expected`. - Added an `llvm::expectedToOptional` utility in case this is useful elsewhere. https://reviews.llvm.org/D66705 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@369943 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
0 files changed, 0 insertions, 0 deletions