reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

Declarations

include/llvm/Support/ErrorOr.h
   57   template <class OtherT> friend class ErrorOr;
tools/lld/include/lld/Common/LLVM.h
   36 template <typename T> class ErrorOr;

References

include/llvm/Bitcode/BitcodeReader.h
   41   ErrorOr<T> expectedToErrorOrAndEmitErrors(LLVMContext &Ctx, Expected<T> Val) {
include/llvm/LTO/legacy/LTOModule.h
   99   static ErrorOr<std::unique_ptr<LTOModule>>
  102   static ErrorOr<std::unique_ptr<LTOModule>>
  105   static ErrorOr<std::unique_ptr<LTOModule>>
  109   static ErrorOr<std::unique_ptr<LTOModule>>
  112   static ErrorOr<std::unique_ptr<LTOModule>>
  213   static ErrorOr<std::unique_ptr<LTOModule>>
include/llvm/ProfileData/SampleProf.h
  340   ErrorOr<uint64_t> findSamplesAt(uint32_t LineOffset,
  352   ErrorOr<SampleRecord::CallTargetMap>
include/llvm/ProfileData/SampleProfReader.h
  254   static ErrorOr<std::unique_ptr<SampleProfileReaderItaniumRemapper>>
  260   static ErrorOr<std::unique_ptr<SampleProfileReaderItaniumRemapper>>
  386   static ErrorOr<std::unique_ptr<SampleProfileReader>>
  392   static ErrorOr<std::unique_ptr<SampleProfileReader>>
  483   template <typename T> ErrorOr<T> readNumber();
  487   template <typename T> ErrorOr<T> readUnencodedNumber();
  495   ErrorOr<StringRef> readString();
  498   template <typename T> inline ErrorOr<uint32_t> readStringIndex(T &Table);
  528   virtual ErrorOr<StringRef> readStringFromTable();
  648   virtual ErrorOr<StringRef> readStringFromTable() override;
  703   template <typename T> ErrorOr<T> readNumber();
  704   ErrorOr<StringRef> readString();
include/llvm/ProfileData/SampleProfWriter.h
   51   static ErrorOr<std::unique_ptr<SampleProfileWriter>>
   56   static ErrorOr<std::unique_ptr<SampleProfileWriter>>
  106   friend ErrorOr<std::unique_ptr<SampleProfileWriter>>
  135   friend ErrorOr<std::unique_ptr<SampleProfileWriter>>
include/llvm/Support/Error.h
 1137 template <typename T> Expected<T> errorOrToExpected(ErrorOr<T> &&EO) {
 1144 template <typename T> ErrorOr<T> expectedToErrorOr(Expected<T> &&E) {
include/llvm/Support/ErrorOr.h
   94   ErrorOr(const ErrorOr &Other) {
  100       const ErrorOr<OtherT> &Other,
  108       const ErrorOr<OtherT> &Other,
  114   ErrorOr(ErrorOr &&Other) {
  120       ErrorOr<OtherT> &&Other,
  130       ErrorOr<OtherT> &&Other,
  136   ErrorOr &operator=(const ErrorOr &Other) {
  136   ErrorOr &operator=(const ErrorOr &Other) {
  141   ErrorOr &operator=(ErrorOr &&Other) {
  141   ErrorOr &operator=(ErrorOr &&Other) {
  177   void copyConstruct(const ErrorOr<OtherT> &Other) {
  200   void copyAssign(const ErrorOr<OtherT> &Other) {
  204     this->~ErrorOr();
  205     new (this) ErrorOr(Other);
  209   void moveConstruct(ErrorOr<OtherT> &&Other) {
  222   void moveAssign(ErrorOr<OtherT> &&Other) {
  226     this->~ErrorOr();
  227     new (this) ErrorOr(std::move(Other));
  272 operator==(const ErrorOr<T> &Err, E Code) {
include/llvm/Support/FileSystem.h
  439 ErrorOr<MD5::MD5Result> md5_contents(int FD);
  442 ErrorOr<MD5::MD5Result> md5_contents(const Twine &Path);
  688 ErrorOr<perms> getPermissions(const Twine &Path);
 1156 ErrorOr<space_info> disk_space(const Twine &Path);
 1238   ErrorOr<basic_file_status> status() const;
 1367         ErrorOr<basic_file_status> status = State->Stack.top()->status();
include/llvm/Support/MemoryBuffer.h
   79   static ErrorOr<std::unique_ptr<MemoryBuffer>>
   86   static ErrorOr<std::unique_ptr<MemoryBuffer>>
   92   static ErrorOr<std::unique_ptr<MemoryBuffer>>
  102   static ErrorOr<std::unique_ptr<MemoryBuffer>>
  121   static ErrorOr<std::unique_ptr<MemoryBuffer>> getSTDIN();
  125   static ErrorOr<std::unique_ptr<MemoryBuffer>>
  130   static ErrorOr<std::unique_ptr<MemoryBuffer>>
  179   static ErrorOr<std::unique_ptr<WritableMemoryBuffer>>
  184   static ErrorOr<std::unique_ptr<WritableMemoryBuffer>>
  241   static ErrorOr<std::unique_ptr<WriteThroughMemoryBuffer>>
  245   static ErrorOr<std::unique_ptr<WriteThroughMemoryBuffer>>
include/llvm/Support/Program.h
   68   ErrorOr<std::string>
include/llvm/Support/VirtualFileSystem.h
  106   virtual llvm::ErrorOr<Status> status() = 0;
  109   virtual llvm::ErrorOr<std::string> getName() {
  117   virtual llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>>
  249   virtual llvm::ErrorOr<Status> status(const Twine &Path) = 0;
  252   virtual llvm::ErrorOr<std::unique_ptr<File>>
  257   llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>>
  271   virtual llvm::ErrorOr<std::string> getCurrentWorkingDirectory() const = 0;
  334   llvm::ErrorOr<Status> status(const Twine &Path) override;
  335   llvm::ErrorOr<std::unique_ptr<File>>
  338   llvm::ErrorOr<std::string> getCurrentWorkingDirectory() const override;
  374   llvm::ErrorOr<Status> status(const Twine &Path) override {
  377   llvm::ErrorOr<std::unique_ptr<File>>
  384   llvm::ErrorOr<std::string> getCurrentWorkingDirectory() const override {
  476   llvm::ErrorOr<Status> status(const Twine &Path) override;
  477   llvm::ErrorOr<std::unique_ptr<File>>
  481   llvm::ErrorOr<std::string> getCurrentWorkingDirectory() const override {
  706   ErrorOr<Entry *> lookupPath(llvm::sys::path::const_iterator Start,
  711   ErrorOr<Status> status(const Twine &Path, Entry *E);
  715   ErrorOr<Entry *> lookupPath(const Twine &Path) const;
  724   ErrorOr<Status> status(const Twine &Path) override;
  725   ErrorOr<std::unique_ptr<File>> openFileForRead(const Twine &Path) override;
  730   llvm::ErrorOr<std::string> getCurrentWorkingDirectory() const override;
lib/AsmParser/Parser.cpp
   58   ErrorOr<std::unique_ptr<MemoryBuffer>> FileOrErr =
   88   ErrorOr<std::unique_ptr<MemoryBuffer>> FileOrErr =
  136   ErrorOr<std::unique_ptr<MemoryBuffer>> FileOrErr =
lib/Bitcode/Reader/BitReader.cpp
   64   ErrorOr<std::unique_ptr<Module>> ModuleOrErr =
  111   ErrorOr<std::unique_ptr<Module>> ModuleOrErr = expectedToErrorOrAndEmitErrors(
lib/Bitcode/Reader/BitcodeReader.cpp
 6723   ErrorOr<std::unique_ptr<MemoryBuffer>> FileOrErr =
lib/DebugInfo/GSYM/GsymReader.cpp
   37   ErrorOr<std::unique_ptr<MemoryBuffer>> BuffOrErr =
lib/DebugInfo/PDB/PDB.cpp
   27     ErrorOr<std::unique_ptr<MemoryBuffer>> ErrorOrBuffer =
lib/DebugInfo/PDB/PDBContext.cpp
   26   ErrorOr<uint64_t> ImageBase = Object.getImageBase();
lib/DebugInfo/Symbolize/DIPrinter.cpp
   38   ErrorOr<std::unique_ptr<MemoryBuffer>> BufOrErr =
lib/DebugInfo/Symbolize/SymbolizableObjectFile.cpp
   44 ErrorOr<std::unique_ptr<SymbolizableObjectFile>>
lib/DebugInfo/Symbolize/SymbolizableObjectFile.h
   33   static ErrorOr<std::unique_ptr<SymbolizableObjectFile>>
lib/DebugInfo/Symbolize/Symbolize.cpp
  191   ErrorOr<std::unique_ptr<MemoryBuffer>> MB =
lib/IR/Core.cpp
 4002   ErrorOr<std::unique_ptr<MemoryBuffer>> MBOrErr = MemoryBuffer::getFile(Path);
 4013   ErrorOr<std::unique_ptr<MemoryBuffer>> MBOrErr = MemoryBuffer::getSTDIN();
lib/IRReader/IRReader.cpp
   56   ErrorOr<std::unique_ptr<MemoryBuffer>> FileOrErr =
   99   ErrorOr<std::unique_ptr<MemoryBuffer>> FileOrErr =
lib/LTO/Caching.cpp
   46       ErrorOr<std::unique_ptr<MemoryBuffer>> MBOrErr =
   90         ErrorOr<std::unique_ptr<MemoryBuffer>> MBOrErr =
lib/LTO/LTOCodeGenerator.cpp
  303   ErrorOr<std::unique_ptr<MemoryBuffer>> BufferOrErr =
lib/LTO/LTOModule.cpp
   62   ErrorOr<std::unique_ptr<MemoryBuffer>> BufferOrErr =
   88   ErrorOr<std::string> TripleOrErr =
  101   ErrorOr<std::string> ProducerOrErr = expectedToErrorOrAndEmitErrors(
  108 ErrorOr<std::unique_ptr<LTOModule>>
  111   ErrorOr<std::unique_ptr<MemoryBuffer>> BufferOrErr =
  122 ErrorOr<std::unique_ptr<LTOModule>>
  128 ErrorOr<std::unique_ptr<LTOModule>>
  132   ErrorOr<std::unique_ptr<MemoryBuffer>> BufferOrErr =
  144 ErrorOr<std::unique_ptr<LTOModule>>
  153 ErrorOr<std::unique_ptr<LTOModule>>
  161   ErrorOr<std::unique_ptr<LTOModule>> Ret =
  168 static ErrorOr<std::unique_ptr<Module>>
  192 ErrorOr<std::unique_ptr<LTOModule>>
  195   ErrorOr<std::unique_ptr<Module>> MOrErr =
lib/LTO/ThinLTOCodeGenerator.cpp
  353   ErrorOr<std::unique_ptr<MemoryBuffer>> tryLoadingBuffer() {
  361     ErrorOr<std::unique_ptr<MemoryBuffer>> MBOrErr = MemoryBuffer::getOpenFile(
lib/Object/Archive.cpp
  449   ErrorOr<std::unique_ptr<MemoryBuffer>> Buf = MemoryBuffer::getFile(FullName);
lib/Object/ArchiveWriter.cpp
   94   ErrorOr<std::unique_ptr<MemoryBuffer>> MemberBufferOrErr =
  510 static ErrorOr<SmallString<128>> canonicalizePath(StringRef P) {
  521   ErrorOr<SmallString<128>> PathToOrErr = canonicalizePath(To);
  522   ErrorOr<SmallString<128>> DirFromOrErr = canonicalizePath(From);
lib/Object/Binary.cpp
   97   ErrorOr<std::unique_ptr<MemoryBuffer>> FileOrErr =
lib/Object/ObjectFile.cpp
  169   ErrorOr<std::unique_ptr<MemoryBuffer>> FileOrErr =
lib/ProfileData/GCOV.cpp
  621     ErrorOr<std::unique_ptr<MemoryBuffer>> BufferOrErr =
lib/ProfileData/InstrProfReader.cpp
   42   ErrorOr<std::unique_ptr<MemoryBuffer>> BufferOrErr =
lib/ProfileData/SampleProfReader.cpp
  289 template <typename T> ErrorOr<T> SampleProfileReaderBinary::readNumber() {
  310 ErrorOr<StringRef> SampleProfileReaderBinary::readString() {
  324 ErrorOr<T> SampleProfileReaderBinary::readUnencodedNumber() {
  339 inline ErrorOr<uint32_t> SampleProfileReaderBinary::readStringIndex(T &Table) {
  349 ErrorOr<StringRef> SampleProfileReaderBinary::readStringFromTable() {
  357 ErrorOr<StringRef> SampleProfileReaderCompactBinary::readStringFromTable() {
  976 template <typename T> ErrorOr<T> SampleProfileReaderGCC::readNumber() {
  992 ErrorOr<StringRef> SampleProfileReaderGCC::readString() {
 1242 static ErrorOr<std::unique_ptr<MemoryBuffer>>
 1265 ErrorOr<std::unique_ptr<SampleProfileReader>>
 1284 ErrorOr<std::unique_ptr<SampleProfileReaderItaniumRemapper>>
 1304 ErrorOr<std::unique_ptr<SampleProfileReaderItaniumRemapper>>
 1332 ErrorOr<std::unique_ptr<SampleProfileReader>>
lib/ProfileData/SampleProfWriter.cpp
  565 ErrorOr<std::unique_ptr<SampleProfileWriter>>
  587 ErrorOr<std::unique_ptr<SampleProfileWriter>>
lib/Remarks/BitstreamRemarkParser.cpp
  425   ErrorOr<std::unique_ptr<MemoryBuffer>> BufferOrErr =
lib/Remarks/YAMLRemarkParser.cpp
  150       ErrorOr<std::unique_ptr<MemoryBuffer>> BufferOrErr =
lib/Support/CachePruning.cpp
  223     ErrorOr<sys::fs::basic_file_status> StatusOrErr = File->status();
lib/Support/CommandLine.cpp
 1044   ErrorOr<std::unique_ptr<MemoryBuffer>> MemBufOrErr =
lib/Support/FileCollector.cpp
  199   llvm::ErrorOr<llvm::vfs::Status> status(const Twine &Path) override {
  206   llvm::ErrorOr<std::unique_ptr<llvm::vfs::File>>
  249   llvm::ErrorOr<std::string> getCurrentWorkingDirectory() const override {
lib/Support/FileUtilities.cpp
  185   ErrorOr<std::unique_ptr<MemoryBuffer>> F1OrErr = MemoryBuffer::getFile(NameA);
  193   ErrorOr<std::unique_ptr<MemoryBuffer>> F2OrErr = MemoryBuffer::getFile(NameB);
lib/Support/GraphWriter.cpp
  120       if (ErrorOr<std::string> P = sys::findProgramByName(Name)) {
lib/Support/Host.cpp
   57   llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> Text =
 1236   llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> Text =
lib/Support/LockFileManager.cpp
   54   ErrorOr<std::unique_ptr<MemoryBuffer>> MBOrErr =
lib/Support/MemoryBuffer.cpp
  107 static ErrorOr<std::unique_ptr<MB>>
  125 static ErrorOr<std::unique_ptr<WritableMemoryBuffer>>
  142 ErrorOr<std::unique_ptr<MemoryBuffer>>
  153 ErrorOr<std::unique_ptr<MemoryBuffer>>
  210 static ErrorOr<std::unique_ptr<WritableMemoryBuffer>>
  230 ErrorOr<std::unique_ptr<MemoryBuffer>>
  238 static ErrorOr<std::unique_ptr<MB>>
  244 static ErrorOr<std::unique_ptr<MB>>
  258 ErrorOr<std::unique_ptr<WritableMemoryBuffer>>
  266 ErrorOr<std::unique_ptr<WritableMemoryBuffer>>
  363 static ErrorOr<std::unique_ptr<WriteThroughMemoryBuffer>>
  404 ErrorOr<std::unique_ptr<WriteThroughMemoryBuffer>>
  410 ErrorOr<std::unique_ptr<WriteThroughMemoryBuffer>>
  417 static ErrorOr<std::unique_ptr<MB>>
  481 ErrorOr<std::unique_ptr<MemoryBuffer>>
  488 ErrorOr<std::unique_ptr<MemoryBuffer>>
  496 ErrorOr<std::unique_ptr<MemoryBuffer>> MemoryBuffer::getSTDIN() {
  506 ErrorOr<std::unique_ptr<MemoryBuffer>>
  513   ErrorOr<std::unique_ptr<MemoryBuffer>> Ret =
lib/Support/Path.cpp
  995 ErrorOr<MD5::MD5Result> md5_contents(int FD) {
 1015 ErrorOr<MD5::MD5Result> md5_contents(const Twine &Path) {
 1099 ErrorOr<perms> getPermissions(const Twine &Path) {
lib/Support/Signals.cpp
  119   ErrorOr<std::string> LLVMSymbolizerPathOrErr = std::error_code();
lib/Support/SourceMgr.cpp
   44   ErrorOr<std::unique_ptr<MemoryBuffer>> NewBufOrErr =
lib/Support/SpecialCaseList.cpp
  101     ErrorOr<std::unique_ptr<MemoryBuffer>> FileOrErr =
lib/Support/Unix/Path.inc
  273 ErrorOr<space_info> disk_space(const Twine &Path) {
  864 ErrorOr<basic_file_status> directory_entry::status() const {
 1040     ErrorOr<basic_file_status> st = Item.status();
lib/Support/Unix/Program.inc
   68 ErrorOr<std::string> sys::findProgramByName(StringRef Name,
lib/Support/VirtualFileSystem.cpp
  114 ErrorOr<std::unique_ptr<MemoryBuffer>>
  189   ErrorOr<Status> status() override;
  190   ErrorOr<std::string> getName() override;
  191   ErrorOr<std::unique_ptr<MemoryBuffer>> getBuffer(const Twine &Name,
  202 ErrorOr<Status> RealFile::status() {
  213 ErrorOr<std::string> RealFile::getName() {
  217 ErrorOr<std::unique_ptr<MemoryBuffer>>
  255   ErrorOr<Status> status(const Twine &Path) override;
  256   ErrorOr<std::unique_ptr<File>> openFileForRead(const Twine &Path) override;
  259   llvm::ErrorOr<std::string> getCurrentWorkingDirectory() const override;
  287 ErrorOr<Status> RealFileSystem::status(const Twine &Path) {
  296 ErrorOr<std::unique_ptr<File>>
  307 llvm::ErrorOr<std::string> RealFileSystem::getCurrentWorkingDirectory() const {
  400 ErrorOr<Status> OverlayFileSystem::status(const Twine &Path) {
  403     ErrorOr<Status> Status = (*I)->status(Path);
  410 ErrorOr<std::unique_ptr<File>>
  421 llvm::ErrorOr<std::string>
  606   llvm::ErrorOr<Status> status() override {
  610   llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>>
  806 static ErrorOr<const detail::InMemoryNode *>
  862 llvm::ErrorOr<Status> InMemoryFileSystem::status(const Twine &Path) {
  869 llvm::ErrorOr<std::unique_ptr<File>>
 1046 llvm::ErrorOr<std::string>
 1078   ErrorOr<RedirectingFileSystem::Entry *> E = lookupPath(Dir);
 1085   ErrorOr<Status> S = status(Dir, *E);
 1624 ErrorOr<RedirectingFileSystem::Entry *>
 1647     ErrorOr<RedirectingFileSystem::Entry *> Result =
 1655 ErrorOr<RedirectingFileSystem::Entry *>
 1693     ErrorOr<RedirectingFileSystem::Entry *> Result =
 1710 ErrorOr<Status> RedirectingFileSystem::status(const Twine &Path,
 1714     ErrorOr<Status> S = ExternalFS->status(F->getExternalContentsPath());
 1726 ErrorOr<Status> RedirectingFileSystem::status(const Twine &Path) {
 1727   ErrorOr<RedirectingFileSystem::Entry *> Result = lookupPath(Path);
 1749   ErrorOr<Status> status() override { return S; }
 1750   ErrorOr<std::unique_ptr<llvm::MemoryBuffer>>
 1763 ErrorOr<std::unique_ptr<File>>
 1765   ErrorOr<RedirectingFileSystem::Entry *> E = lookupPath(Path);
 1796   ErrorOr<RedirectingFileSystem::Entry *> Result = lookupPath(Path);
 1859   ErrorOr<RedirectingFileSystem::Entry *> RootE = VFS->lookupPath("/");
lib/TableGen/Main.cpp
   87   ErrorOr<std::unique_ptr<MemoryBuffer>> FileOrErr =
lib/Target/BPF/BTFDebug.cpp
  683   else if (ErrorOr<std::unique_ptr<MemoryBuffer>> BufOrErr =
lib/Target/X86/X86InsertPrefetch.cpp
   70 ErrorOr<PrefetchHints> getPrefetchHints(const FunctionSamples *TopSamples,
  119   const ErrorOr<PrefetchHints> T = getPrefetchHints(TopSamples, MI);
  161   ErrorOr<std::unique_ptr<SampleProfileReader>> ReaderOrErr =
lib/ToolDrivers/llvm-dlltool/DlltoolDriver.cpp
   58   ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> MB = MemoryBuffer::getFile(Path);
lib/ToolDrivers/llvm-lib/LibDriver.cpp
  118     ErrorOr<std::unique_ptr<MemoryBuffer>> MaybeBuf =
  342     ErrorOr<std::unique_ptr<MemoryBuffer>> MOrErr =
lib/Transforms/IPO/Internalize.cpp
   75     ErrorOr<std::unique_ptr<MemoryBuffer>> Buf =
lib/Transforms/IPO/SampleProfile.cpp
  298   ErrorOr<uint64_t> getInstWeight(const Instruction &I);
  299   ErrorOr<uint64_t> getBlockWeight(const BasicBlock *BB);
  659 ErrorOr<uint64_t> SampleProfileLoader::getInstWeight(const Instruction &Inst) {
  686   ErrorOr<uint64_t> R = FS->findSamplesAt(LineOffset, Discriminator);
  721 ErrorOr<uint64_t> SampleProfileLoader::getBlockWeight(const BasicBlock *BB) {
  725     const ErrorOr<uint64_t> &R = getInstWeight(I);
  744     ErrorOr<uint64_t> Weight = getBlockWeight(&BB);
lib/Transforms/Utils/SymbolRewriter.cpp
  252   ErrorOr<std::unique_ptr<MemoryBuffer>> Mapping =
tools/bugpoint/ExecutionDriver.cpp
  150     if (ErrorOr<std::string> ClangPath =
tools/bugpoint/OptimizerDriver.cpp
  168     if (ErrorOr<std::string> Path =
  185     if (ErrorOr<std::string> Path = sys::findProgramByName("valgrind"))
tools/bugpoint/ToolRunner.cpp
  204 ErrorOr<std::string> llvm::FindProgramByName(const std::string &ExeName,
  212   if (ErrorOr<std::string> Path = sys::findProgramByName(ExeName, Result))
  223   if (ErrorOr<std::string> LLIPath =
  512   ErrorOr<std::string> LLCPath =
  594   if (ErrorOr<std::string> LLIPath =
tools/bugpoint/ToolRunner.h
  185 ErrorOr<std::string> FindProgramByName(const std::string &ExeName,
tools/clang/include/clang/Basic/FileManager.h
   67       llvm::StringMapEntry<llvm::ErrorOr<DirectoryEntry &>> *Entry)
   70   const llvm::StringMapEntry<llvm::ErrorOr<DirectoryEntry &>> *Entry;
  202   llvm::StringMap<llvm::ErrorOr<DirectoryEntry &>, llvm::BumpPtrAllocator>
  221   llvm::StringMap<llvm::ErrorOr<SeenFileEntryOrRedirect>,
  305   llvm::ErrorOr<const DirectoryEntry *>
  322   llvm::ErrorOr<const FileEntry *>
  380   llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>>
  382   llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>>
  388   llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>>
tools/clang/include/clang/Frontend/PrecompiledPreamble.h
   78   static llvm::ErrorOr<PrecompiledPreamble>
  135     static llvm::ErrorOr<TempPCHFile> CreateNewPreamblePCHFile();
  138     static llvm::ErrorOr<TempPCHFile> createInSystemTempDir(const Twine &Prefix,
  143     static llvm::ErrorOr<TempPCHFile> createFromCustomPath(const Twine &Path);
tools/clang/include/clang/Frontend/SerializedDiagnosticReader.h
   72   llvm::ErrorOr<Cursor> skipUntilRecordOrBlock(llvm::BitstreamCursor &Stream,
tools/clang/include/clang/Tooling/DependencyScanning/DependencyScanningFilesystem.h
   63   llvm::ErrorOr<StringRef> getContents() const {
   72   llvm::ErrorOr<llvm::vfs::Status> getStatus() const {
   96   llvm::ErrorOr<llvm::vfs::Status> MaybeStat;
  152   llvm::ErrorOr<llvm::vfs::Status> status(const Twine &Path) override;
  153   llvm::ErrorOr<std::unique_ptr<llvm::vfs::File>>
  171   llvm::ErrorOr<const CachedFileSystemEntry *>
tools/clang/lib/ARCMigrate/FileRemapper.cpp
   65   llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> fileBuf =
   81     llvm::ErrorOr<const FileEntry *> origFE = FileMgr->getFile(fromFilename);
   87     llvm::ErrorOr<const FileEntry *> newFE = FileMgr->getFile(toFilename);
tools/clang/lib/ARCMigrate/ObjCMT.cpp
 2093     llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> FileBufOrErr =
tools/clang/lib/Basic/FileManager.cpp
   72 static llvm::ErrorOr<const DirectoryEntry *>
  186 llvm::ErrorOr<const DirectoryEntry *>
  194 llvm::ErrorOr<const FileEntry *>
  456 llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>>
  478 llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>>
  518   llvm::ErrorOr<llvm::vfs::Status> S = FS->status(FilePath.c_str());
  531   for (llvm::StringMap<llvm::ErrorOr<SeenFileEntryOrRedirect>,
  536     if (llvm::ErrorOr<SeenFileEntryOrRedirect> Entry = FE->getValue()) {
tools/clang/lib/Basic/FileSystemStatCache.cpp
   47     llvm::ErrorOr<llvm::vfs::Status> StatusOrErr = FS.status(Path);
   70       llvm::ErrorOr<llvm::vfs::Status> StatusOrErr = (*OwnedFile)->status();
tools/clang/lib/CodeGen/BackendUtil.cpp
 1401     ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> MBOrErr =
tools/clang/lib/CodeGen/CGCUDANV.cpp
  518     llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> CudaGpuBinaryOrErr =
tools/clang/lib/Driver/DarwinSDKInfo.cpp
   22   llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> File =
tools/clang/lib/Driver/Distro.cpp
   21   llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> File =
tools/clang/lib/Driver/Driver.cpp
 1184     llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> CrashFile =
 4646     if (llvm::ErrorOr<std::string> P =
tools/clang/lib/Driver/ToolChains/Clang.cpp
  527   } else if (llvm::ErrorOr<std::string> CWD =
tools/clang/lib/Driver/ToolChains/Cuda.cpp
  102       if (llvm::ErrorOr<std::string> ptxas =
  155     llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> VersionFile =
tools/clang/lib/Driver/ToolChains/Gnu.cpp
 2435   llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> File =
 2447       llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> ConfigFile =
tools/clang/lib/Driver/ToolChains/MinGW.cpp
  341 llvm::ErrorOr<std::string> toolchains::MinGW::findGcc() {
  348     if (llvm::ErrorOr<std::string> GPPName = llvm::sys::findProgramByName(CandidateGcc))
  353 llvm::ErrorOr<std::string> toolchains::MinGW::findClangRelativeSysroot() {
  379   else if (llvm::ErrorOr<std::string> TargetSubdir = findClangRelativeSysroot())
  381   else if (llvm::ErrorOr<std::string> GPPName = findGcc())
tools/clang/lib/Driver/ToolChains/MinGW.h
  102   llvm::ErrorOr<std::string> findGcc();
  103   llvm::ErrorOr<std::string> findClangRelativeSysroot();
tools/clang/lib/Format/Format.cpp
 2631       llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> Text =
tools/clang/lib/Frontend/ASTUnit.cpp
  141 static std::unique_ptr<T> valueOrNull(llvm::ErrorOr<std::unique_ptr<T>> Val) {
  148 static bool moveOnNoError(llvm::ErrorOr<T> Val, T &Output) {
 1378     llvm::ErrorOr<PrecompiledPreamble> NewPreamble = PrecompiledPreamble::Build(
tools/clang/lib/Frontend/CompilerInstance.cpp
  205     llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> Buffer =
  877     llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> SBOrErr =
tools/clang/lib/Frontend/CompilerInvocation.cpp
 3701     llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> Buffer =
tools/clang/lib/Frontend/PrecompiledPreamble.cpp
  220 template <class T> bool moveOnNoError(llvm::ErrorOr<T> Val, T &Output) {
  235 llvm::ErrorOr<PrecompiledPreamble> PrecompiledPreamble::Build(
  253     llvm::ErrorOr<PrecompiledPreamble::TempPCHFile> PreamblePCHFile =
  533 llvm::ErrorOr<PrecompiledPreamble::TempPCHFile>
  544 llvm::ErrorOr<PrecompiledPreamble::TempPCHFile>
  560 llvm::ErrorOr<PrecompiledPreamble::TempPCHFile>
tools/clang/lib/Frontend/SerializedDiagnosticReader.cpp
  115 llvm::ErrorOr<SerializedDiagnosticReader::Cursor>
  174     llvm::ErrorOr<Cursor> Res = skipUntilRecordOrBlock(Stream, BlockOrCode);
  226     llvm::ErrorOr<Cursor> Res = skipUntilRecordOrBlock(Stream, BlockOrCode);
tools/clang/lib/Serialization/GlobalModuleIndex.cpp
  258   llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> BufferOrErr =
tools/clang/lib/Serialization/ModuleManager.cpp
  183     llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> Buf((std::error_code()));
tools/clang/lib/StaticAnalyzer/Checkers/Yaml.h
   33   llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> Buffer =
tools/clang/lib/Tooling/CompilationDatabase.cpp
  365   llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> File =
tools/clang/lib/Tooling/DependencyScanning/DependencyScanningFilesystem.cpp
   21   llvm::ErrorOr<std::unique_ptr<llvm::vfs::File>> MaybeFile =
   25   llvm::ErrorOr<llvm::vfs::Status> Stat = (*MaybeFile)->status();
   30   llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> MaybeBuffer =
  151 llvm::ErrorOr<const CachedFileSystemEntry *>
  198 llvm::ErrorOr<llvm::vfs::Status>
  202   const llvm::ErrorOr<const CachedFileSystemEntry *> Result =
  219   llvm::ErrorOr<llvm::vfs::Status> status() override { return Stat; }
  223   llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>>
  236 llvm::ErrorOr<std::unique_ptr<llvm::vfs::File>>
  242   llvm::ErrorOr<StringRef> Contents = Entry->getContents();
  258 llvm::ErrorOr<std::unique_ptr<llvm::vfs::File>>
  263   const llvm::ErrorOr<const CachedFileSystemEntry *> Result =
tools/clang/lib/Tooling/DependencyScanning/DependencyScanningWorker.cpp
   54   llvm::ErrorOr<std::string> getCurrentWorkingDirectory() const override {
tools/clang/lib/Tooling/JSONCompilationDatabase.cpp
  198   llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> DatabaseBuffer =
tools/clang/tools/arcmt-test/arcmt-test.cpp
  211   ErrorOr<std::unique_ptr<MemoryBuffer>> file1 = MemoryBuffer::getFile(fname1);
  215   ErrorOr<std::unique_ptr<MemoryBuffer>> file2 = MemoryBuffer::getFile(fname2);
  240   ErrorOr<std::unique_ptr<MemoryBuffer>> inputBuf = std::error_code();
tools/clang/tools/clang-format/ClangFormat.cpp
  314   llvm::ErrorOr<const FileEntry *> FileEntryPtr =
  377   ErrorOr<std::unique_ptr<MemoryBuffer>> CodeOrErr =
  484     ErrorOr<std::unique_ptr<MemoryBuffer>> CodeOrErr =
tools/clang/tools/clang-offload-bundler/ClangOffloadBundler.cpp
  467     ErrorOr<std::string> Objcopy = sys::findProgramByName(
  677     ErrorOr<std::unique_ptr<MemoryBuffer>> CodeOrErr =
  716   ErrorOr<std::unique_ptr<MemoryBuffer>> CodeOrErr =
tools/clang/tools/clang-offload-wrapper/ClangOffloadWrapper.cpp
  340     ErrorOr<std::unique_ptr<MemoryBuffer>> BufOrErr =
tools/clang/tools/clang-refactor/ClangRefactor.cpp
  487       llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> BufferErr =
tools/clang/tools/clang-refactor/TestSupport.cpp
   92     llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> BufferErr =
  162   ErrorOr<std::unique_ptr<MemoryBuffer>> ErrOrFile =
  295   ErrorOr<std::unique_ptr<MemoryBuffer>> ErrOrFile =
tools/clang/tools/clang-rename/ClangRename.cpp
  105     ErrorOr<std::unique_ptr<MemoryBuffer>> Buffer =
tools/clang/tools/driver/cc1as_main.cpp
  336   ErrorOr<std::unique_ptr<MemoryBuffer>> Buffer =
tools/clang/tools/driver/cc1gen_reproducer_main.cpp
  163   llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> Buffer =
tools/clang/tools/driver/driver.cpp
   58       if (llvm::ErrorOr<std::string> P =
  293     if (llvm::ErrorOr<std::string> Tmp = llvm::sys::findProgramByName(
tools/clang/tools/extra/clang-apply-replacements/lib/Tooling/ApplyReplacements.cpp
   60     ErrorOr<std::unique_ptr<MemoryBuffer>> Out =
  104     ErrorOr<std::unique_ptr<MemoryBuffer>> Out =
  237   llvm::ErrorOr<std::unique_ptr<MemoryBuffer>> Buffer =
tools/clang/tools/extra/clang-change-namespace/tool/ClangChangeNamespace.cpp
   81 llvm::ErrorOr<std::vector<std::string>> GetWhiteListedSymbolPatterns() {
   87   llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> File =
  106   llvm::ErrorOr<std::vector<std::string>> WhiteListPatterns =
tools/clang/tools/extra/clang-include-fixer/YamlSymbolIndex.cpp
   24 llvm::ErrorOr<std::unique_ptr<YamlSymbolIndex>>
   34 llvm::ErrorOr<std::unique_ptr<YamlSymbolIndex>>
tools/clang/tools/extra/clang-include-fixer/YamlSymbolIndex.h
   25   static llvm::ErrorOr<std::unique_ptr<YamlSymbolIndex>>
   28   static llvm::ErrorOr<std::unique_ptr<YamlSymbolIndex>>
tools/clang/tools/extra/clang-include-fixer/plugin/IncludeFixerPlugin.cpp
   65       llvm::ErrorOr<std::unique_ptr<include_fixer::YamlSymbolIndex>> SymbolIdx(
tools/clang/tools/extra/clang-include-fixer/tool/ClangIncludeFixer.cpp
  194       llvm::ErrorOr<std::unique_ptr<include_fixer::YamlSymbolIndex>> DB(
  278     llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> CodeOrErr =
tools/clang/tools/extra/clang-tidy/ClangTidy.cpp
  190         llvm::ErrorOr<std::unique_ptr<MemoryBuffer>> Buffer =
tools/clang/tools/extra/clang-tidy/ClangTidyOptions.cpp
  294     llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> Text =
  306     llvm::ErrorOr<ClangTidyOptions> ParsedOptions =
  327 llvm::ErrorOr<ClangTidyOptions> parseConfiguration(StringRef Config) {
tools/clang/tools/extra/clang-tidy/ClangTidyOptions.h
  187   typedef std::pair<std::string, std::function<llvm::ErrorOr<ClangTidyOptions>(
  267 llvm::ErrorOr<ClangTidyOptions> parseConfiguration(llvm::StringRef Config);
tools/clang/tools/extra/clang-tidy/tool/ClangTidyMain.cpp
  291     if (llvm::ErrorOr<ClangTidyOptions> ParsedConfig =
  310   llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> Buffer =
tools/clang/tools/extra/clangd/FS.cpp
   64     llvm::ErrorOr<std::unique_ptr<llvm::vfs::File>>
   79     llvm::ErrorOr<llvm::vfs::Status> status(const llvm::Twine &Path) override {
  102     llvm::ErrorOr<llvm::vfs::Status> status(const llvm::Twine &Path) override {
tools/clang/tools/extra/clangd/FSProvider.cpp
   28   llvm::ErrorOr<std::unique_ptr<llvm::vfs::File>>
   52     virtual llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>>
   59     llvm::ErrorOr<llvm::vfs::Status> status() override {
   62     llvm::ErrorOr<std::string> getName() override { return Wrapped->getName(); }
tools/clang/tools/extra/clangd/unittests/ClangdTests.cpp
  910         llvm::ErrorOr<std::unique_ptr<llvm::vfs::File>>
  915         llvm::ErrorOr<llvm::vfs::Status> status(const Twine &Path) override {
tools/clang/tools/extra/modularize/CoverageChecker.cpp
  251     llvm::ErrorOr<sys::fs::basic_file_status> Status = I->status();
  375     llvm::ErrorOr<sys::fs::basic_file_status> Status = I->status();
tools/clang/tools/extra/modularize/ModularizeUtilities.cpp
  147   ErrorOr<std::unique_ptr<MemoryBuffer>> listBuffer =
  220   ErrorOr<std::unique_ptr<MemoryBuffer>> listBuffer =
  411     llvm::ErrorOr<llvm::sys::fs::basic_file_status> Status = I->status();
tools/clang/tools/extra/unittests/clang-tidy/ClangTidyOptionsTest.cpp
   58   llvm::ErrorOr<ClangTidyOptions> Options =
   70   llvm::ErrorOr<ClangTidyOptions> Options1 = parseConfiguration(R"(
   79   llvm::ErrorOr<ClangTidyOptions> Options2 = parseConfiguration(R"(
tools/clang/unittests/Frontend/PCHPreambleTest.cpp
   32   ErrorOr<std::unique_ptr<vfs::File>> openFileForRead(const Twine &Path) override
tools/dsymutil/DebugMap.cpp
  126 ErrorOr<std::vector<std::unique_ptr<DebugMap>>>
tools/dsymutil/DebugMap.h
  130   static ErrorOr<std::vector<std::unique_ptr<DebugMap>>>
tools/dsymutil/DwarfLinker.cpp
 2215 ErrorOr<const object::ObjectFile &>
tools/dsymutil/DwarfLinker.h
  462   ErrorOr<const object::ObjectFile &> loadObject(const DebugMapObject &Obj,
tools/dsymutil/MachODebugMapParser.cpp
   37   ErrorOr<std::vector<std::unique_ptr<DebugMap>>> parse();
  377 ErrorOr<std::vector<std::unique_ptr<DebugMap>>> MachODebugMapParser::parse() {
  584 llvm::ErrorOr<std::vector<std::unique_ptr<DebugMap>>>
tools/dsymutil/dsymutil.h
   37 ErrorOr<std::vector<std::unique_ptr<DebugMap>>>
tools/gold/gold-plugin.cpp
  515     ErrorOr<std::unique_ptr<MemoryBuffer>> BufferOrErr =
tools/lld/COFF/Driver.cpp
  772   ErrorOr<std::unique_ptr<MemoryBuffer>> oldBuf = MemoryBuffer::getFile(
tools/lld/COFF/DriverUtils.cpp
   57     ErrorOr<std::string> exeOrErr = sys::findProgramByName(prog);
tools/lld/COFF/InputFiles.cpp
  125   for (const ErrorOr<Archive::Child> &cOrErr : file->children(err)) {
tools/lld/COFF/PDB.cpp
 1340     ErrorOr<std::unique_ptr<MemoryBuffer>> dataOrErr =
tools/lld/ELF/Driver.cpp
  165   for (const ErrorOr<Archive::Child> &cOrErr : file->children(err)) {
tools/lld/include/lld/Common/ErrorHandler.h
  130 template <class T> T check(ErrorOr<T> e) {
  143 T check2(ErrorOr<T> e, llvm::function_ref<std::string()> prefix) {
tools/lld/include/lld/Core/Reader.h
   51   virtual ErrorOr<std::unique_ptr<File>>
   87   ErrorOr<std::unique_ptr<File>>
tools/lld/include/lld/ReaderWriter/MachOLinkingContext.h
  368   ErrorOr<std::unique_ptr<MemoryBuffer>> getMemoryBuffer(StringRef path);
tools/lld/lib/Core/Reader.cpp
   35 ErrorOr<std::unique_ptr<File>>
tools/lld/lib/Driver/DarwinLdDriver.cpp
  120   ErrorOr<std::unique_ptr<MemoryBuffer>> mbOrErr = ctx.getMemoryBuffer(path);
  123   ErrorOr<std::unique_ptr<File>> fileOrErr =
  171   ErrorOr<std::unique_ptr<MemoryBuffer>> mb =
  201   ErrorOr<std::unique_ptr<MemoryBuffer>> mb =
  260   ErrorOr<std::unique_ptr<MemoryBuffer>> mb =
 1110         ErrorOr<std::unique_ptr<MemoryBuffer>> contentOrErr =
tools/lld/lib/ReaderWriter/FileArchive.cpp
  153     ErrorOr<std::unique_ptr<File>> fileOrErr =
  209   ErrorOr<std::unique_ptr<File>> loadFile(std::unique_ptr<MemoryBuffer> mb,
tools/lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp
  657 ErrorOr<std::unique_ptr<MemoryBuffer>>
  661   ErrorOr<std::unique_ptr<MemoryBuffer>> mbOrErr =
  677   ErrorOr<std::unique_ptr<MemoryBuffer>> mbOrErr = getMemoryBuffer(path);
  681   ErrorOr<std::unique_ptr<File>> fileOrErr =
tools/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp
  147   ErrorOr<std::unique_ptr<MemoryBuffer>> b = MemoryBuffer::getFileOrSTDIN(path);
  541   ErrorOr<std::unique_ptr<File>>
  567   ErrorOr<std::unique_ptr<File>>
tools/lld/lib/ReaderWriter/YAML/ReaderWriterYAML.cpp
 1358   ErrorOr<std::unique_ptr<File>>
tools/lld/unittests/MachOTests/MachONormalizedFileBinaryWriterTests.cpp
   32   ErrorOr<std::unique_ptr<MemoryBuffer>> mbOrErr = MemoryBuffer::getFile(path);
tools/lld/wasm/Driver.cpp
  197   for (const ErrorOr<Archive::Child> &cOrErr : file->children(err)) {
tools/lldb/include/lldb/Host/FileSystem.h
   81   llvm::ErrorOr<llvm::vfs::Status> GetStatus(const FileSpec &file_spec) const;
   82   llvm::ErrorOr<llvm::vfs::Status> GetStatus(const llvm::Twine &path) const;
  182   llvm::ErrorOr<std::string> GetExternalPath(const llvm::Twine &path);
  183   llvm::ErrorOr<std::string> GetExternalPath(const FileSpec &file_spec);
tools/lldb/include/lldb/Host/common/NativeProcessProtocol.h
  179   virtual llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>>
tools/lldb/include/lldb/Host/linux/Support.h
   18 llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>>
   21 llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>>
   24 llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>>
tools/lldb/include/lldb/Utility/Reproducer.h
  307     llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> buffer =
tools/lldb/source/Commands/CommandCompletions.cpp
  182     llvm::ErrorOr<llvm::vfs::Status> Status = fs.GetStatus(Entry.path());
tools/lldb/source/Commands/CommandObjectReproducer.cpp
  253       ErrorOr<std::unique_ptr<MemoryBuffer>> buffer =
tools/lldb/source/Host/common/FileSystem.cpp
   60   llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> buffer =
   98 llvm::ErrorOr<vfs::Status>
  103 llvm::ErrorOr<vfs::Status> FileSystem::GetStatus(const Twine &path) const {
  113   ErrorOr<vfs::Status> status = m_fs->status(path);
  124   ErrorOr<vfs::Status> status = m_fs->status(path);
  146   ErrorOr<vfs::Status> status = m_fs->status(path);
  169   ErrorOr<vfs::Status> status = m_fs->status(path);
  198     ErrorOr<vfs::Status> Status = m_fs->status(Item.path());
  286   const ErrorOr<std::string> external_path = GetExternalPath(path);
  327   llvm::ErrorOr<std::string> error_or_path =
  445 ErrorOr<std::string> FileSystem::GetExternalPath(const llvm::Twine &path) {
  450   ErrorOr<vfs::RedirectingFileSystem::Entry *> E =
  466 ErrorOr<std::string> FileSystem::GetExternalPath(const FileSpec &file_spec) {
tools/lldb/source/Host/linux/Support.cpp
   13 llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>>
   25 llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>>
   35 llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>>
tools/lldb/source/Plugins/Process/Linux/NativeProcessLinux.h
   98   llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>>
tools/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
   85   llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> ErrorOrBuffer =
tools/lldb/unittests/Host/FileSystemTest.cpp
   26   llvm::ErrorOr<vfs::Status> status() override { return S; }
   27   llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>>
   49   ErrorOr<vfs::Status> status(const Twine &Path) override {
   56   ErrorOr<std::unique_ptr<vfs::File>>
   63   llvm::ErrorOr<std::string> getCurrentWorkingDirectory() const override {
tools/lli/lli.cpp
  265     ErrorOr<std::unique_ptr<MemoryBuffer>> IRObjectBuffer =
  494     ErrorOr<std::unique_ptr<MemoryBuffer>> ArBufOrErr =
tools/llvm-ar/llvm-ar.cpp
  963   ErrorOr<std::unique_ptr<MemoryBuffer>> Buf =
  998   ErrorOr<std::unique_ptr<MemoryBuffer>> Buf = MemoryBuffer::getSTDIN();
tools/llvm-cov/CodeCoverage.cpp
   82   ErrorOr<const MemoryBuffer &> getSourceFile(StringRef SourceFile);
  230 ErrorOr<const MemoryBuffer &>
tools/llvm-cov/gcov.cpp
   46   ErrorOr<std::unique_ptr<MemoryBuffer>> GCNO_Buff =
   58   ErrorOr<std::unique_ptr<MemoryBuffer>> GCDA_Buff =
tools/llvm-dwarfdump/llvm-dwarfdump.cpp
  524   ErrorOr<std::unique_ptr<MemoryBuffer>> BuffOrErr =
tools/llvm-elfabi/llvm-elfabi.cpp
   75   ErrorOr<std::unique_ptr<MemoryBuffer>> BufOrError =
tools/llvm-exegesis/lib/SnippetFile.cpp
  121   ErrorOr<std::unique_ptr<MemoryBuffer>> BufferPtr =
tools/llvm-ifs/llvm-ifs.cpp
  204   ErrorOr<std::unique_ptr<MemoryBuffer>> BufOrError =
tools/llvm-lto/llvm-lto.cpp
  301 static void error(const ErrorOr<T> &V, const Twine &Prefix) {
  313   ErrorOr<std::unique_ptr<MemoryBuffer>> BufferOrErr =
  321   ErrorOr<std::unique_ptr<LTOModule>> Ret = LTOModule::createInLocalContext(
  947     ErrorOr<std::unique_ptr<LTOModule>> ModuleOrErr =
tools/llvm-lto2/llvm-lto2.cpp
  160 template <typename T> static T check(ErrorOr<T> E, std::string Msg) {
tools/llvm-mc/llvm-mc.cpp
  333   ErrorOr<std::unique_ptr<MemoryBuffer>> BufferPtr =
tools/llvm-mca/llvm-mca.cpp
  236 ErrorOr<std::unique_ptr<ToolOutputFile>> getOutputStream() {
  316   ErrorOr<std::unique_ptr<MemoryBuffer>> BufferPtr =
tools/llvm-mt/llvm-mt.cpp
  139     ErrorOr<std::unique_ptr<MemoryBuffer>> ManifestOrErr =
tools/llvm-nm/llvm-nm.cpp
 1777   ErrorOr<std::unique_ptr<MemoryBuffer>> BufferOrErr =
tools/llvm-objcopy/COFF/COFFObjcopy.cpp
   44   ErrorOr<std::unique_ptr<MemoryBuffer>> LinkTargetOrErr =
tools/llvm-objcopy/CopyConfig.cpp
  349 template <class T> static ErrorOr<T> getAsInteger(StringRef Val) {
tools/llvm-objcopy/ELF/ELFObjcopy.cpp
  695     ErrorOr<std::unique_ptr<MemoryBuffer>> BufOrErr =
tools/llvm-objdump/MachODump.cpp
 7359       ErrorOr<std::unique_ptr<MemoryBuffer>> BufOrErr =
tools/llvm-opt-report/OptReport.cpp
  149   ErrorOr<std::unique_ptr<MemoryBuffer>> Buf =
  262     ErrorOr<std::unique_ptr<MemoryBuffer>> Buf =
tools/llvm-pdbutil/llvm-pdbutil.cpp
  746   ErrorOr<std::unique_ptr<MemoryBuffer>> ErrorOrBuffer =
tools/llvm-rc/llvm-rc.cpp
  110   ErrorOr<std::unique_ptr<MemoryBuffer>> File =
tools/llvm-readobj/ARMEHABIPrinter.h
  345   ErrorOr<StringRef> FunctionAtAddress(unsigned Section, uint64_t Address) const;
  366 ErrorOr<StringRef>
  488     if (ErrorOr<StringRef> Name = FunctionAtAddress(EHT->sh_link, Address))
  537     if (ErrorOr<StringRef> Name = FunctionAtAddress(IT->sh_link, Offset))
tools/llvm-readobj/ARMWinEHPrinter.cpp
  211 ErrorOr<object::SectionRef>
  223 ErrorOr<object::SymbolRef> Decoder::getSymbol(const COFFObjectFile &COFF,
  241 ErrorOr<SymbolRef> Decoder::getRelocatedSymbol(const COFFObjectFile &,
  893     ErrorOr<SymbolRef> Symbol = getRelocatedSymbol(
  926   ErrorOr<SymbolRef> Function = getRelocatedSymbol(COFF, Section, Offset);
  930   ErrorOr<SymbolRef> XDataRecord = getRelocatedSymbol(COFF, Section, Offset + 4);
 1003     ErrorOr<SectionRef> Section = getSectionContaining(COFF, Address);
 1018   ErrorOr<SymbolRef> Function = getRelocatedSymbol(COFF, Section, Offset);
tools/llvm-readobj/ARMWinEHPrinter.h
  129   ErrorOr<object::SectionRef>
  132   ErrorOr<object::SymbolRef>
  136   ErrorOr<object::SymbolRef>
tools/llvm-rtdyld/llvm-rtdyld.cpp
  375     ErrorOr<std::unique_ptr<MemoryBuffer>> InputBuffer =
  511       ErrorOr<std::unique_ptr<MemoryBuffer>> InputBuffer =
  584     ErrorOr<std::unique_ptr<MemoryBuffer>> CheckerFileBuf =
  901     ErrorOr<std::unique_ptr<MemoryBuffer>> InputBuffer =
tools/llvm-strings/llvm-strings.cpp
  110     ErrorOr<std::unique_ptr<MemoryBuffer>> Buffer =
tools/llvm-undname/llvm-undname.cpp
   83     ErrorOr<std::unique_ptr<MemoryBuffer>> FileOrErr =
tools/lto/lto.cpp
  187   ErrorOr<std::unique_ptr<MemoryBuffer>> Buffer = MemoryBuffer::getFile(path);
  199   ErrorOr<bool> Result = expectedToErrorOrAndEmitErrors(
  222   ErrorOr<std::unique_ptr<LTOModule>> M =
  232   ErrorOr<std::unique_ptr<LTOModule>> M = LTOModule::createFromOpenFile(
  245   ErrorOr<std::unique_ptr<LTOModule>> M = LTOModule::createFromOpenFileSlice(
  255   ErrorOr<std::unique_ptr<LTOModule>> M =
  267   ErrorOr<std::unique_ptr<LTOModule>> M = LTOModule::createFromBuffer(
  284   ErrorOr<std::unique_ptr<LTOModule>> M = LTOModule::createInLocalContext(
  297   ErrorOr<std::unique_ptr<LTOModule>> M = LTOModule::createFromBuffer(
tools/obj2yaml/wasm2yaml.cpp
   26   ErrorOr<WasmYAML::Object *> dump();
  175 ErrorOr<WasmYAML::Object *> WasmDumper::dump() {
  379   ErrorOr<WasmYAML::Object *> YAMLOrErr = Dumper.dump();
tools/polly/lib/Exchange/JSONExporter.cpp
  701   ErrorOr<std::unique_ptr<MemoryBuffer>> result =
tools/sancov/sancov.cpp
  140   static ErrorOr<std::unique_ptr<RawCoverage>>
  191 template <typename T> static void failIfError(const ErrorOr<T> &E) {
  229 ErrorOr<std::unique_ptr<RawCoverage>>
  231   ErrorOr<std::unique_ptr<MemoryBuffer>> BufOrErr =
  368   ErrorOr<std::unique_ptr<MemoryBuffer>> BufOrErr =
  837 static ErrorOr<bool> isCoverageFile(const std::string &FileName) {
  842   ErrorOr<std::unique_ptr<MemoryBuffer>> BufOrErr =
  868   ErrorOr<std::unique_ptr<MemoryBuffer>> BufOrErr =
tools/sanstats/sanstats.cpp
  127   ErrorOr<std::unique_ptr<MemoryBuffer>> MBOrErr =
tools/verify-uselistorder/verify-uselistorder.cpp
  151   ErrorOr<std::unique_ptr<MemoryBuffer>> BufferOr =
tools/yaml2obj/yaml2obj.cpp
   60   ErrorOr<std::unique_ptr<MemoryBuffer>> Buf =
unittests/ProfileData/SampleProfTest.cpp
  182     ErrorOr<SampleRecord::CallTargetMap> CTMap =
  385   ErrorOr<uint64_t> BodySamples = FooSamples.findSamplesAt(10, 0);
unittests/Support/ErrorOrTest.cpp
   18 ErrorOr<int> t1() { return 1; }
   19 ErrorOr<int> t2() { return errc::invalid_argument; }
   22   ErrorOr<int> a = t1();
   28   ErrorOr<int> b = a;
   39 ErrorOr<std::unique_ptr<int> > t3() {
   45   ErrorOr<int&> a(x);
   57   ErrorOr<B*> b(ErrorOr<D*>(nullptr));
   60   ErrorOr<std::unique_ptr<B> > b1(ErrorOr<std::unique_ptr<D> >(nullptr));
   63   ErrorOr<std::unique_ptr<int>> b2(ErrorOr<int *>(nullptr));
   64   ErrorOr<int *> b3(nullptr);
   65   ErrorOr<std::unique_ptr<int>> b4(b3);
   69   ErrorOr<int> x(errc::no_such_file_or_directory);
   74   ErrorOr<std::string> x("string literal");
   85   ErrorOr<Destination> x = s;
   95   ErrorOr<CastsToErrorCode> x1(casts_to_error_code);
   96   ErrorOr<CastsToErrorCode> x2 = casts_to_error_code;
   97   ErrorOr<CastsToErrorCode> x3 = {casts_to_error_code};
   98   ErrorOr<CastsToErrorCode> x4{casts_to_error_code};
   99   ErrorOr<CastsToErrorCode> x5(errc::no_such_file_or_directory);
  100   ErrorOr<CastsToErrorCode> x6 = errc::no_such_file_or_directory;
  101   ErrorOr<CastsToErrorCode> x7 = {errc::no_such_file_or_directory};
  102   ErrorOr<CastsToErrorCode> x8{errc::no_such_file_or_directory};
  116     !std::is_convertible<const ErrorOr<int *> &,
  117                          ErrorOr<std::unique_ptr<int>>>::value,
  123     !std::is_convertible<ErrorOr<int *> &&,
  124                          ErrorOr<std::unique_ptr<int>>>::value,
  130 static_assert(!std::is_assignable<ErrorOr<std::unique_ptr<int>>&,
  131                                   const ErrorOr<int *> &>::value,
  136 static_assert(!std::is_assignable<ErrorOr<std::unique_ptr<int>>&,
  137                                   ErrorOr<int *> &&>::value,
unittests/Support/MemoryBufferTest.cpp
  114     ErrorOr<OwningBuffer> MB = MemoryBuffer::getOpenFile(*File, TestPath, 6);
  142   ErrorOr<OwningBuffer> MB = MemoryBuffer::getFile(TestPath.c_str());
  188   ErrorOr<OwningBuffer> MB =
  244   ErrorOr<OwningBuffer> Buf = MemoryBuffer::getOpenFileSlice(
  294   ErrorOr<OwningBuffer> MB = MemoryBuffer::getFileSlice(TestPath.str(),
  309   ErrorOr<OwningBuffer> MB2 = MemoryBuffer::getFileSlice(TestPath.str(),
unittests/Support/Path.cpp
 1609   ErrorOr<fs::perms> Perms = fs::getPermissions(TempPath);
 1672     ErrorOr<fs::perms> Actual = fs::getPermissions(TempPath);
unittests/Support/TarWriterTest.cpp
   55   ErrorOr<std::unique_ptr<MemoryBuffer>> MBOrErr = MemoryBuffer::getFile(Path);
unittests/Support/VirtualFileSystemTest.cpp
   32   llvm::ErrorOr<vfs::Status> status() override { return S; }
   33   llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>>
   56   ErrorOr<vfs::Status> status(const Twine &Path) override {
   62   ErrorOr<std::unique_ptr<vfs::File>>
   69   llvm::ErrorOr<std::string> getCurrentWorkingDirectory() const override {
  188   ErrorOr<vfs::Status> Status((std::error_code()));
  221   ErrorOr<vfs::Status> Status2 = D->status("/foo");
  228   ErrorOr<vfs::Status> Status((std::error_code()));
  238   ErrorOr<vfs::Status> Status2((std::error_code()));
  282   ErrorOr<vfs::Status> Status1((std::error_code())),
  323   ErrorOr<vfs::Status> Status1 = Lower->status("/lower-only");
  325   ErrorOr<vfs::Status> Status2 = O->status("/lower-only");
  344   ErrorOr<vfs::Status> Status((std::error_code()));
  371   ErrorOr<vfs::Status> Status((std::error_code()));
 1409   ErrorOr<vfs::Status> S = O->status("//root/file1");
 1414   ErrorOr<vfs::Status> SLower = O->status("//root/foo/bar/a");
 1462   ErrorOr<vfs::Status> S = O->status("//root/XX");
 1465   ErrorOr<vfs::Status> SS = O->status("//root/xx");
 1498   ErrorOr<vfs::Status> SS = O->status("//root/xx");
 2041   llvm::ErrorOr<std::string> WorkingDir = FS->getCurrentWorkingDirectory();
 2045   llvm::ErrorOr<vfs::Status> Status = FS->status("./a");
 2101   llvm::ErrorOr<vfs::Status> Status = FS->status("bar/a");
 2158   llvm::ErrorOr<vfs::Status> Status = FS->status("bar/a");
utils/FileCheck/FileCheck.cpp
  589   ErrorOr<std::unique_ptr<MemoryBuffer>> CheckFileOrErr =
  609   ErrorOr<std::unique_ptr<MemoryBuffer>> InputFileOrErr =
utils/yaml-bench/YAMLBench.cpp
  202     ErrorOr<std::unique_ptr<MemoryBuffer>> BufOrErr =