llvm-project/clang/lib/Basic
Duncan P. N. Exon Smith 9ef6c49baf 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

llvm-svn: 369943
2019-08-26 18:29:51 +00:00
..
Targets Reland "[ARM] push LR before __gnu_mcount_nc" 2019-08-16 23:30:16 +00:00
Attributes.cpp Introduce the _Clang scoped attribute token. 2018-11-09 17:19:45 +00:00
Builtins.cpp [OpenCL] Support pipe keyword in C++ mode 2019-05-22 13:12:20 +00:00
CMakeLists.txt Improve behavior in the case of stack exhaustion. 2019-08-26 18:18:07 +00:00
CharInfo.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CodeGenOptions.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Cuda.cpp [HIP] Add GPU arch gfx1010, gfx1011, and gfx1012 2019-07-11 17:50:09 +00:00
Diagnostic.cpp Change std::{lower,upper}_bound to llvm::{lower,upper}_bound or llvm::partition_point. NFC 2019-07-03 08:13:17 +00:00
DiagnosticIDs.cpp Use a unique_ptr instead of manual memory management for CustomDiagInfo 2019-07-15 17:20:34 +00:00
DiagnosticOptions.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FileManager.cpp FileManager: Use llvm::Expected in new getFileRef API 2019-08-26 18:29:51 +00:00
FileSystemStatCache.cpp [FileSystemStatCache] Return std::error_code from stat cache methods 2019-04-16 17:34:26 +00:00
FixedPoint.cpp Fix parameter name comments using clang-tidy. NFC. 2019-07-16 04:46:31 +00:00
IdentifierTable.cpp [Sema][ObjC] Fix a -Wformat false positive with localizedStringForKey 2019-08-14 16:57:11 +00:00
LangOptions.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
LangStandards.cpp Move LangStandard*, InputKind::Language to Basic 2019-08-05 13:59:26 +00:00
Module.cpp [clang] Adopt new FileManager error-returning APIs 2019-08-01 21:31:56 +00:00
ObjCRuntime.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
OpenMPKinds.cpp [OPENMP5.0]Add support for device_type clause in declare target 2019-08-23 16:11:14 +00:00
OperatorPrecedence.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SanitizerBlacklist.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SanitizerSpecialCaseList.cpp [Driver] Allow enum SanitizerOrdinal to represent more than 64 different sanitizer checks, NFC. 2019-03-01 10:05:15 +00:00
Sanitizers.cpp Tweak r355278 for compatibility with gcc 6 and earlier. 2019-03-02 21:55:36 +00:00
SourceLocation.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SourceManager.cpp Introduce FileEntryRef and use it when handling includes to report correct dependencies 2019-08-22 18:15:50 +00:00
Stack.cpp Fix file header. 2019-08-26 18:21:13 +00:00
TargetInfo.cpp Add SVE opaque built-in types 2019-08-09 08:52:54 +00:00
Targets.cpp [RISCV] Add FreeBSD targets 2019-08-01 13:14:30 +00:00
Targets.h De-templatize non-dependent VS macro logic, NFC 2019-07-09 20:57:28 +00:00
TokenKinds.cpp Use switch instead of series of comparisons 2019-08-03 16:32:49 +00:00
Version.cpp This reverts commit 632a36bfcfc8273c1861f04ff6758d863c47c784. 2019-07-13 06:27:35 +00:00
Warnings.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
XRayInstr.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
XRayLists.cpp Fix file headers. NFC 2019-03-01 06:49:51 +00:00