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

Declarations

include/llvm/ObjectYAML/yaml2obj.h
   21 template <typename T> class Expected;
include/llvm/Support/CachePruning.h
   22 template <typename T> class Expected;
include/llvm/Support/Error.h
  169   template <typename T> friend class Expected;
  435   template <class OtherT> friend class Expected;
tools/clang/include/clang/Basic/LLVM.h
   38   template <class T> class Expected;
tools/clang/include/clang/CodeGen/BackendUtil.h
   18   template <typename T> class Expected;
tools/lld/include/lld/Common/LLVM.h
   37 template <typename T> class Expected;

References

examples/Kaleidoscope/BuildingAJIT/Chapter1/KaleidoscopeJIT.h
   54   static Expected<std::unique_ptr<KaleidoscopeJIT>> Create() {
   76   Expected<JITEvaluatedSymbol> lookup(StringRef Name) {
examples/Kaleidoscope/BuildingAJIT/Chapter2/KaleidoscopeJIT.h
   65   static Expected<std::unique_ptr<KaleidoscopeJIT>> Create() {
   83   Expected<JITEvaluatedSymbol> lookup(StringRef Name) {
   88   static Expected<ThreadSafeModule>
examples/LLJITExamples/ExampleModules.h
   33 inline llvm::Expected<llvm::orc::ThreadSafeModule>
examples/SpeculativeJIT/SpeculativeJIT.cpp
   42   static Expected<std::unique_ptr<SpeculativeJIT>> Create() {
   83   Expected<JITEvaluatedSymbol> lookup(StringRef UnmangledName) {
include/llvm/BinaryFormat/MsgPackReader.h
  122   Expected<bool> read(Object &Obj);
  135   template <class T> Expected<bool> readRaw(Object &Obj);
  136   template <class T> Expected<bool> readInt(Object &Obj);
  137   template <class T> Expected<bool> readUInt(Object &Obj);
  138   template <class T> Expected<bool> readLength(Object &Obj);
  139   template <class T> Expected<bool> readExt(Object &Obj);
  140   Expected<bool> createRaw(Object &Obj, uint32_t Size);
  141   Expected<bool> createExt(Object &Obj, uint32_t Size);
include/llvm/Bitcode/BitcodeReader.h
   41   ErrorOr<T> expectedToErrorOrAndEmitErrors(LLVMContext &Ctx, Expected<T> Val) {
   77     friend Expected<BitcodeFileContents>
   80     Expected<std::unique_ptr<Module>> getModuleImpl(LLVMContext &Context,
   98     Expected<std::unique_ptr<Module>> getLazyModule(LLVMContext &Context,
  103     Expected<std::unique_ptr<Module>> parseModule(LLVMContext &Context);
  107     Expected<BitcodeLTOInfo> getLTOInfo();
  110     Expected<std::unique_ptr<ModuleSummaryIndex>> getSummary();
  128   Expected<BitcodeFileContents> getBitcodeFileContents(MemoryBufferRef Buffer);
  131   Expected<std::vector<BitcodeModule>>
  138   Expected<std::unique_ptr<Module>>
  147   Expected<std::unique_ptr<Module>> getOwningLazyBitcodeModule(
  154   Expected<std::string> getBitcodeTargetTriple(MemoryBufferRef Buffer);
  158   Expected<bool> isBitcodeContainingObjCCategory(MemoryBufferRef Buffer);
  163   Expected<std::string> getBitcodeProducerString(MemoryBufferRef Buffer);
  166   Expected<std::unique_ptr<Module>> parseBitcodeFile(MemoryBufferRef Buffer,
  170   Expected<BitcodeLTOInfo> getBitcodeLTOInfo(MemoryBufferRef Buffer);
  173   Expected<std::unique_ptr<ModuleSummaryIndex>>
  185   Expected<std::unique_ptr<ModuleSummaryIndex>>
include/llvm/Bitstream/BitstreamReader.h
  141       if (Expected<word_t> Res = Read(WordBitNo))
  189   Expected<word_t> Read(unsigned NumBits) {
  232   Expected<uint32_t> ReadVBR(unsigned NumBits) {
  233     Expected<unsigned> MaybeRead = Read(NumBits);
  259   Expected<uint64_t> ReadVBR64(unsigned NumBits) {
  260     Expected<uint64_t> MaybeRead = Read(NumBits);
  399   Expected<BitstreamEntry> advance(unsigned Flags = 0) {
  404       Expected<unsigned> MaybeCode = ReadCode();
  417         if (Expected<unsigned> MaybeSubBlock = ReadSubBlockID())
  438   Expected<BitstreamEntry> advanceSkippingSubblocks(unsigned Flags = 0) {
  441       Expected<BitstreamEntry> MaybeEntry = advance(Flags);
  455   Expected<unsigned> ReadCode() { return Read(CurCodeSize); }
  461   Expected<unsigned> ReadSubBlockID() { return ReadVBR(bitc::BlockIDWidth); }
  467     if (Expected<uint32_t> Res = ReadVBR(bitc::CodeLenWidth))
  474     Expected<unsigned> MaybeNum = Read(bitc::BlockSizeWidth);
  532   Expected<unsigned> skipRecord(unsigned AbbrevID);
  534   Expected<unsigned> readRecord(unsigned AbbrevID,
  548   Expected<Optional<BitstreamBlockInfo>>
include/llvm/DebugInfo/CodeView/CVRecord.h
   96 inline Expected<CVRecord<Kind>> readCVRecordFromStream(BinaryStreamRef Stream,
include/llvm/DebugInfo/CodeView/DebugStringTableSubsection.h
   42   Expected<StringRef> getString(uint32_t Offset) const;
include/llvm/DebugInfo/CodeView/SymbolDeserializer.h
   48   template <typename T> static Expected<T> deserializeAs(CVSymbol Symbol) {
include/llvm/DebugInfo/CodeView/SymbolRecord.h
 1002 Expected<CVSymbol> readSymbolFromStream(BinaryStreamRef Stream,
include/llvm/DebugInfo/CodeView/TypeDeserializer.h
   55   static Expected<T> deserializeAs(ArrayRef<uint8_t> Data) {
include/llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h
  409     Expected<AttributeEncoding> extractAttributeEncoding(uint64_t *Offset);
  411     Expected<std::vector<AttributeEncoding>>
  414     Expected<Abbrev> extractAbbrev(uint64_t *Offset);
  454     Expected<Entry> getEntry(uint64_t *Offset) const;
include/llvm/DebugInfo/DWARF/DWARFContext.h
  299   Expected<const DWARFDebugLine::LineTable *>
include/llvm/DebugInfo/DWARF/DWARFDebugAddr.h
   66   Expected<uint64_t> getAddrEntry(uint32_t Index) const;
include/llvm/DebugInfo/DWARF/DWARFDebugLine.h
  312   Expected<const LineTable *> getOrParseLineTable(
include/llvm/DebugInfo/DWARF/DWARFDebugLoc.h
   73   Expected<LocationList>
  115   static Expected<LocationList> parseOneLocationList(const DataExtractor &Data,
include/llvm/DebugInfo/DWARF/DWARFDie.h
  219   Expected<DWARFAddressRangesVector> getAddressRanges() const;
include/llvm/DebugInfo/DWARF/DWARFListTable.h
  166   Expected<DWARFListType> findList(DWARFDataExtractor Data, uint64_t Offset);
  269 Expected<DWARFListType>
include/llvm/DebugInfo/DWARF/DWARFUnit.h
  189   Expected<StrOffsetsContributionDescriptor>
  254   Expected<Optional<StrOffsetsContributionDescriptor>>
  261   Expected<Optional<StrOffsetsContributionDescriptor>>
  409   Expected<DWARFAddressRangesVector> findRnglistFromOffset(uint64_t Offset);
  414   Expected<DWARFAddressRangesVector> findRnglistFromIndex(uint32_t Index);
  425   Expected<DWARFAddressRangesVector> collectAddressRanges();
include/llvm/DebugInfo/GSYM/FunctionInfo.h
  131   static llvm::Expected<FunctionInfo> decode(DataExtractor &Data,
  141   llvm::Expected<uint64_t> encode(FileWriter &O) const;
include/llvm/DebugInfo/GSYM/GsymReader.h
   81   static llvm::Expected<GsymReader> openFile(StringRef Path);
   89   static llvm::Expected<GsymReader> copyBuffer(StringRef Bytes);
  101   llvm::Expected<FunctionInfo> getFunctionInfo(uint64_t Addr) const;
  198   static llvm::Expected<llvm::gsym::GsymReader>
  211   Expected<uint64_t> getAddressIndex(const uint64_t Addr) const;
include/llvm/DebugInfo/GSYM/Header.h
  111   static llvm::Expected<Header> decode(DataExtractor &Data);
include/llvm/DebugInfo/GSYM/InlineInfo.h
  103   static llvm::Expected<InlineInfo> decode(DataExtractor &Data,
include/llvm/DebugInfo/GSYM/LineTable.h
  137   static llvm::Expected<LineTable> decode(DataExtractor &Data,
include/llvm/DebugInfo/MSF/IMSFFile.h
   32   virtual Expected<ArrayRef<uint8_t>> getBlockData(uint32_t BlockIndex,
include/llvm/DebugInfo/MSF/MSFBuilder.h
   56   static Expected<MSFBuilder> create(BumpPtrAllocator &Allocator,
   73   Expected<uint32_t> addStream(uint32_t Size, ArrayRef<uint32_t> Blocks);
   79   Expected<uint32_t> addStream(uint32_t Size);
  113   Expected<MSFLayout> generateLayout();
  116   Expected<FileBufferByteStream> commit(StringRef Path, MSFLayout &Layout);
include/llvm/DebugInfo/PDB/Native/DbiModuleList.h
   74   Expected<StringRef> getFileName(uint32_t Index) const;
include/llvm/DebugInfo/PDB/Native/DbiStream.h
   91   Expected<StringRef> getECName(uint32_t NI) const;
  100   Expected<std::unique_ptr<msf::MappedBlockStream>>
include/llvm/DebugInfo/PDB/Native/DbiStreamBuilder.h
   75   Expected<DbiModuleDescriptorBuilder &> addModuleInfo(StringRef ModuleName);
   77   Expected<uint32_t> getSourceFileNameIndex(StringRef FileName);
include/llvm/DebugInfo/PDB/Native/InfoStream.h
   54   Expected<uint32_t> getNamedStreamIndex(llvm::StringRef Name) const;
include/llvm/DebugInfo/PDB/Native/ModuleDebugStream.h
   67   Expected<codeview::DebugChecksumsSubsectionRef>
include/llvm/DebugInfo/PDB/Native/PDBFile.h
   70   Expected<ArrayRef<uint8_t>> getBlockData(uint32_t BlockIndex,
   89   Expected<std::unique_ptr<msf::MappedBlockStream>>
   91   Expected<std::unique_ptr<msf::MappedBlockStream>>
  100   Expected<InfoStream &> getPDBInfoStream();
  101   Expected<DbiStream &> getPDBDbiStream();
  102   Expected<GlobalsStream &> getPDBGlobalsStream();
  103   Expected<TpiStream &> getPDBTpiStream();
  104   Expected<TpiStream &> getPDBIpiStream();
  105   Expected<PublicsStream &> getPDBPublicsStream();
  106   Expected<SymbolStream &> getPDBSymbolStream();
  107   Expected<PDBStringTable &> getStringTable();
  108   Expected<InjectedSourceStream &> getInjectedSourceStream();
include/llvm/DebugInfo/PDB/Native/PDBFileBuilder.h
   59   Expected<uint32_t> getNamedStreamIndex(StringRef Name) const;
   81   Expected<uint32_t> allocateNamedStream(StringRef Name, uint32_t Size);
include/llvm/DebugInfo/PDB/Native/PDBStringTable.h
   42   Expected<StringRef> getStringForID(uint32_t ID) const;
   43   Expected<uint32_t> getIDForString(StringRef Str) const;
include/llvm/DebugInfo/PDB/Native/TpiHashing.h
   18 Expected<uint32_t> hashTypeRecord(const llvm::codeview::CVType &Type);
   66 Expected<TagRecordHash> hashTagRecord(const codeview::CVType &Type);
include/llvm/DebugInfo/PDB/Native/TpiStream.h
   60   Expected<codeview::TypeIndex>
include/llvm/DebugInfo/Symbolize/Symbolize.h
   56   Expected<DILineInfo> symbolizeCode(const ObjectFile &Obj,
   58   Expected<DILineInfo> symbolizeCode(const std::string &ModuleName,
   60   Expected<DIInliningInfo>
   63   Expected<DIGlobal> symbolizeData(const std::string &ModuleName,
   65   Expected<std::vector<DILocal>>
   79   Expected<DILineInfo>
   87   Expected<SymbolizableModule *>
   90   Expected<SymbolizableModule *>
  103   Expected<ObjectPair> getOrCreateObjectPair(const std::string &Path,
  109   Expected<ObjectFile *> getOrCreateObject(const std::string &Path,
include/llvm/ExecutionEngine/JITLink/JITLink.h
  954   virtual void run(Expected<AsyncLookupResult> LR) = 0;
  968     void run(Expected<AsyncLookupResult> LR) override { C(std::move(LR)); }
include/llvm/ExecutionEngine/JITLink/JITLinkMemoryManager.h
   84   virtual Expected<std::unique_ptr<Allocation>>
   91   Expected<std::unique_ptr<Allocation>>
include/llvm/ExecutionEngine/JITSymbol.h
  148   static Expected<JITSymbolFlags>
  221   using GetAddressFtor = unique_function<Expected<JITTargetAddress>()>;
  295   Expected<JITTargetAddress> getAddress() {
  329   using OnResolvedFunction = unique_function<void(Expected<LookupResult>)>;
  344   virtual Expected<LookupSet>
  361   Expected<LookupSet> getResponsibilitySet(const LookupSet &Symbols) final;
include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h
  579   Expected<JITTargetAddress>
  627   Expected<VModuleKey>
include/llvm/ExecutionEngine/Orc/Core.h
  111 using SymbolsResolvedCallback = unique_function<void(Expected<SymbolMap>)>;
  425 Expected<SymbolAliasMap>
  503     virtual Expected<SymbolNameSet>
  609   Expected<SymbolFlagsMap> lookupFlags(const SymbolNameSet &Names);
  622   Expected<SymbolNameSet>
  712   Expected<SymbolNameSet> lookupFlagsImpl(SymbolFlagsMap &Flags,
  842   Expected<SymbolMap>
  877   Expected<SymbolMap> lookup(const JITDylibSearchList &SearchOrder,
  886   Expected<JITEvaluatedSymbol> lookup(const JITDylibSearchList &SearchOrder,
  892   Expected<JITEvaluatedSymbol> lookup(ArrayRef<JITDylib *> SearchOrder,
  898   Expected<JITEvaluatedSymbol> lookup(ArrayRef<JITDylib *> SearchOrder,
 1003   Expected<SymbolNameSet> tryToGenerate(JITDylib &JD,
include/llvm/ExecutionEngine/Orc/ExecutionUtils.h
  259   static Expected<std::unique_ptr<DynamicLibrarySearchGenerator>>
  265   static Expected<std::unique_ptr<DynamicLibrarySearchGenerator>>
  271   Expected<SymbolNameSet> tryToGenerate(JITDylib &JD,
  291   static Expected<std::unique_ptr<StaticLibraryDefinitionGenerator>>
  297   static Expected<std::unique_ptr<StaticLibraryDefinitionGenerator>>
  300   Expected<SymbolNameSet> tryToGenerate(JITDylib &JD,
include/llvm/ExecutionEngine/Orc/GlobalMappingLayer.h
   48   Expected<ModuleHandleT>
include/llvm/ExecutionEngine/Orc/IRCompileLayer.h
   33       std::function<Expected<std::unique_ptr<MemoryBuffer>>(Module &)>;
include/llvm/ExecutionEngine/Orc/IRTransformLayer.h
   30   using TransformFunction = std::function<Expected<ThreadSafeModule>(
include/llvm/ExecutionEngine/Orc/IndirectionUtils.h
   60   virtual Expected<JITTargetAddress> getTrampoline() = 0;
   75   static Expected<std::unique_ptr<LocalTrampolinePool>>
   89   Expected<JITTargetAddress> getTrampoline() override {
  192   Expected<JITTargetAddress> getCompileCallback(CompileFunction Compile);
  226   static Expected<std::unique_ptr<LocalJITCompileCallbackManager>>
  398 Expected<std::unique_ptr<JITCompileCallbackManager>>
include/llvm/ExecutionEngine/Orc/JITTargetMachineBuilder.h
   47   static Expected<JITTargetMachineBuilder> detectHost();
   56   Expected<std::unique_ptr<TargetMachine>> createTargetMachine();
   63   Expected<DataLayout> getDefaultDataLayoutForTarget() {
include/llvm/ExecutionEngine/Orc/LLJIT.h
   39   static Expected<std::unique_ptr<LLJIT>> Create(LLJITBuilderState &S);
   91   Expected<JITEvaluatedSymbol> lookupLinkerMangled(JITDylib &JD,
   97   Expected<JITEvaluatedSymbol> lookupLinkerMangled(StringRef Name) {
  102   Expected<JITEvaluatedSymbol> lookup(JITDylib &JD, StringRef UnmangledName) {
  107   Expected<JITEvaluatedSymbol> lookup(StringRef UnmangledName) {
  124   static Expected<IRCompileLayer::CompileFunction>
  191       std::function<Expected<IRCompileLayer::CompileFunction>(
  258   Expected<std::unique_ptr<JITType>> create() {
include/llvm/ExecutionEngine/Orc/Layer.h
  138   static Expected<std::unique_ptr<BasicObjectLayerMaterializationUnit>>
  160 Expected<SymbolFlagsMap> getObjectSymbolFlags(ExecutionSession &ES,
include/llvm/ExecutionEngine/Orc/LazyReexports.h
   80   Expected<JITTargetAddress> getCallThroughTrampoline(
  134   static Expected<std::unique_ptr<LocalLazyCallThroughManager>>
  148 Expected<std::unique_ptr<LazyCallThroughManager>>
include/llvm/ExecutionEngine/Orc/Legacy.h
   97   Expected<LookupSet> getResponsibilitySet(const LookupSet &Symbols) override;
  116 Expected<SymbolNameSet>
include/llvm/ExecutionEngine/Orc/ObjectTransformLayer.h
   28       std::function<Expected<std::unique_ptr<MemoryBuffer>>(
include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h
  456     Expected<JITTargetAddress> getTrampoline() override {
  503   static Expected<std::unique_ptr<OrcRemoteTargetClient>>
  515   Expected<int> callIntVoid(JITTargetAddress Addr) {
  523   Expected<int> callMain(JITTargetAddress Addr,
  540   Expected<std::unique_ptr<RemoteRTDyldMemoryManager>>
  551   Expected<std::unique_ptr<RemoteIndirectStubsManager>>
  559   Expected<RemoteCompileCallbackManager &>
  576   Expected<JITTargetAddress> getSymbolAddress(StringRef Name) {
  627   Expected<std::tuple<JITTargetAddress, JITTargetAddress, uint32_t>>
  632   Expected<std::tuple<JITTargetAddress, uint32_t>> emitTrampolineBlock() {
  642   Expected<std::vector<uint8_t>> readMem(char *Dst, JITTargetAddress Src,
include/llvm/ExecutionEngine/Orc/OrcRemoteTargetServer.h
  100   Expected<JITTargetAddress> requestCompile(JITTargetAddress TrampolineAddr) {
  157   Expected<int32_t> handleCallIntVoid(JITTargetAddress Addr) {
  170   Expected<int32_t> handleCallMain(JITTargetAddress Addr,
  254   Expected<std::tuple<JITTargetAddress, JITTargetAddress, uint32_t>>
  298   Expected<std::tuple<JITTargetAddress, uint32_t>> handleEmitTrampolineBlock() {
  327   Expected<JITTargetAddress> handleGetSymbolAddress(const std::string &Name) {
  334   Expected<std::tuple<std::string, uint32_t, uint32_t, uint32_t, uint32_t>>
  352   Expected<std::vector<uint8_t>> handleReadMem(JITTargetAddress RSrc,
  376   Expected<JITTargetAddress> handleReserveMem(ResourceIdMgr::ResourceId Id,
include/llvm/ExecutionEngine/Orc/RPCSerialization.h
  127 class RPCTypeName<Expected<T>> {
  480 class SerializationTraits<ChannelT, Expected<T1>, Expected<T2>> {
  480 class SerializationTraits<ChannelT, Expected<T1>, Expected<T2>> {
  483   static Error serialize(ChannelT &C, Expected<T2> &&ValOrErr) {
  494   static Error deserialize(ChannelT &C, Expected<T2> &ValOrErr) {
  511 class SerializationTraits<ChannelT, Expected<T1>, T2> {
  515     return serializeSeq(C, Expected<T2>(std::forward<T2>(Val)));
  521 class SerializationTraits<ChannelT, Expected<T>, Error> {
  525     return serializeSeq(C, Expected<T>(std::move(Err)));
include/llvm/ExecutionEngine/Orc/RPCUtils.h
  217   using ErrorReturnType = Expected<RetT>;
  288 class ResultTraits<Expected<RetT>> : public ResultTraits<RetT> {};
  305 class SupportsErrorReturn<Expected<T>> {
  325                           Expected<HandlerRetT> ResultOrErr) {
  336                             Expected<HandlerRetT>>::serialize(
  371                           Expected<HandlerRetT> ResultOrErr) {
  412               SequenceNumberT SeqNo, Expected<HandlerRetT> ResultOrErr) {
  430   using Type = Expected<T>;
  433 template <typename T> class WrappedHandlerReturn<Expected<T>> {
  435   using Type = Expected<T>;
  458 class AsyncHandlerTraits<Error(std::function<Error(Expected<ResultT>)>, ArgTs...)> {
  461   using ResultType = Expected<ResultT>;
  600 template <typename ArgT> class ResponseHandlerArg<Error(Expected<ArgT>)> {
  602   using ArgType = Expected<ArgT>;
  607 class ResponseHandlerArg<ErrorSuccess(Expected<ArgT>)> {
  609   using ArgType = Expected<ArgT>;
  708 class ResponseHandlerImpl<ChannelT, Expected<FuncRetT>, HandlerT>
  721             SerializationTraits<ChannelT, Expected<FuncRetT>,
 1228   Expected<FunctionIdT> getRemoteFunctionId(bool NegotiateIfNotInMap,
 1411   Expected<NonBlockingCallResult<Func>> appendCallNB(const ArgTs &... Args) {
 1434   Expected<NonBlockingCallResult<Func>> callNB(const ArgTs &... Args) {
include/llvm/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h
  294         Expected<StringRef> SymbolName = Symbol.getName();
include/llvm/ExecutionEngine/Orc/RemoteObjectLayer.h
   47     : public rpc::Function<AddObject, Expected<ObjHandleT>(std::string)> {
   59     : public rpc::Function<FindSymbol, Expected<RemoteSymbol>(std::string,
   67                            Expected<RemoteSymbol>(ObjHandleT, std::string,
   82                            Expected<RemoteSymbol>(ObjHandleT, std::string)> {
   89                            Expected<RemoteSymbol>(ObjHandleT, std::string)> {
  102                            Expected<JITTargetAddress>(RemoteSymbolId)> {
  154     Expected<JITTargetAddress> materialize() {
  195   Expected<RemoteSymbol> jitSymbolToRemote(JITSymbol Sym) {
  209   JITSymbol remoteToJITSymbol(Expected<RemoteSymbol> RemoteSymOrErr) {
  237   Expected<JITTargetAddress> materializeRemoteSymbol(RemoteSymbolId Id) {
  253   Expected<JITTargetAddress> handleMaterializeRemoteSymbol(RemoteSymbolId Id) {
  331   Expected<ObjHandleT>
  371   Expected<RemoteSymbol> lookup(ObjHandleT H, const std::string &Name) {
  379   Expected<RemoteSymbol> lookupInLogicalDylib(ObjHandleT H,
  469   Expected<ObjHandleT> addObject(std::string ObjBuffer) {
  499   Expected<RemoteSymbol> findSymbol(const std::string &Name,
  508   Expected<RemoteSymbol> findSymbolIn(ObjHandleT H, const std::string &Name,
include/llvm/ExecutionEngine/RuntimeDyldChecker.h
  137       std::function<Expected<MemoryRegionInfo>(StringRef SymbolName)>;
  138   using GetSectionInfoFunction = std::function<Expected<MemoryRegionInfo>(
  140   using GetStubInfoFunction = std::function<Expected<MemoryRegionInfo>(
  142   using GetGOTInfoFunction = std::function<Expected<MemoryRegionInfo>(
include/llvm/IR/RemarkStreamer.h
   92 Expected<std::unique_ptr<ToolOutputFile>>
include/llvm/LTO/Caching.h
   33 Expected<NativeObjectCache> localCache(StringRef CacheDirectoryPath,
include/llvm/LTO/LTO.h
   89 Expected<std::unique_ptr<ToolOutputFile>>
   95 Expected<std::unique_ptr<ToolOutputFile>>
  128   static Expected<std::unique_ptr<InputFile>> create(MemoryBufferRef Object);
  410   Expected<RegularLTOState::AddedModule>
include/llvm/MC/MCContext.h
  547     Expected<unsigned> getDwarfFile(StringRef Directory, StringRef FileName,
include/llvm/MC/MCDwarf.h
  228   Expected<unsigned> tryGetFile(StringRef &Directory, StringRef &FileName,
  314   Expected<unsigned> tryGetFile(StringRef &Directory, StringRef &FileName,
include/llvm/MC/MCStreamer.h
  819   virtual Expected<unsigned> tryEmitDwarfFileDirective(
include/llvm/MCA/InstrBuilder.h
   51   Expected<const InstrDesc &> createInstrDescImpl(const MCInst &MCI);
   52   Expected<const InstrDesc &> getOrCreateInstrDesc(const MCInst &MCI);
   71   Expected<std::unique_ptr<Instruction>> createInstruction(const MCInst &MCI);
include/llvm/MCA/Pipeline.h
   71   Expected<unsigned> run();
include/llvm/Object/Archive.h
   46   Expected<StringRef> getRawName() const;
   49   Expected<StringRef> getName(uint64_t Size) const;
   51   Expected<uint64_t> getSize() const;
   53   Expected<sys::fs::perms> getAccessMode() const;
   54   Expected<sys::TimePoint<std::chrono::seconds>> getLastModified() const;
   61   Expected<unsigned> getUID() const;
   62   Expected<unsigned> getGID() const;
   98     Expected<bool> isThinMember() const;
  110     Expected<Child> getNext() const;
  112     Expected<StringRef> getName() const;
  113     Expected<std::string> getFullName() const;
  114     Expected<StringRef> getRawName() const { return Header.getRawName(); }
  116     Expected<sys::TimePoint<std::chrono::seconds>> getLastModified() const {
  124     Expected<unsigned> getUID() const { return Header.getUID(); }
  125     Expected<unsigned> getGID() const { return Header.getGID(); }
  127     Expected<sys::fs::perms> getAccessMode() const {
  132     Expected<uint64_t> getSize() const;
  134     Expected<uint64_t> getRawSize() const;
  136     Expected<StringRef> getBuffer() const;
  140     Expected<MemoryBufferRef> getMemoryBufferRef() const;
  142     Expected<std::unique_ptr<Binary>>
  194     Expected<Child> getMember() const;
  222   static Expected<std::unique_ptr<Archive>> create(MemoryBufferRef Source);
  258   Expected<Optional<Child>> findSym(StringRef name) const;
include/llvm/Object/ArchiveWriter.h
   32   static Expected<NewArchiveMember>
   35   static Expected<NewArchiveMember> getFile(StringRef FileName,
   39 Expected<std::string> computeArchiveRelativePath(StringRef From, StringRef To);
include/llvm/Object/Binary.h
  180 Expected<std::unique_ptr<Binary>> createBinary(MemoryBufferRef Source,
  231 Expected<OwningBinary<Binary>> createBinary(StringRef Path);
include/llvm/Object/COFF.h
  894   Expected<StringRef> getSymbolName(DataRefImpl Symb) const override;
  895   Expected<uint64_t> getSymbolAddress(DataRefImpl Symb) const override;
  900   Expected<SymbolRef::Type> getSymbolType(DataRefImpl Symb) const override;
  901   Expected<section_iterator> getSymbolSection(DataRefImpl Symb) const override;
  903   Expected<StringRef> getSectionName(DataRefImpl Sec) const override;
  907   Expected<ArrayRef<uint8_t>>
  943   Expected<uint64_t> getStartAddress() const override;
  998   Expected<COFFSymbolRef> getSymbol(uint32_t index) const {
 1016     Expected<COFFSymbolRef> S = getSymbol(index);
 1041   Expected<StringRef> getSectionName(const coff_section *Sec) const;
 1213   Expected<ArrayRef<UTF16>>
 1215   Expected<const coff_resource_dir_table &>
 1217   Expected<const coff_resource_data_entry &>
 1219   Expected<const coff_resource_dir_table &> getBaseTable();
 1220   Expected<const coff_resource_dir_entry &>
 1223   Expected<StringRef> getContents(const coff_resource_data_entry &Entry);
 1233   Expected<const coff_resource_dir_table &> getTableAtOffset(uint32_t Offset);
 1234   Expected<const coff_resource_dir_entry &>
 1236   Expected<const coff_resource_data_entry &>
 1238   Expected<ArrayRef<UTF16>> getDirStringAtOffset(uint32_t Offset);
include/llvm/Object/COFFModuleDefinition.h
   45 Expected<COFFModuleDefinition>
include/llvm/Object/Decompressor.h
   27   static Expected<Decompressor> create(StringRef Name, StringRef Data,
include/llvm/Object/ELF.h
  124   Expected<const T *> getEntry(uint32_t Section, uint32_t Entry) const;
  126   Expected<const T *> getEntry(const Elf_Shdr *Section, uint32_t Entry) const;
  128   Expected<StringRef>
  131   Expected<StringRef> getStringTableForSymtab(const Elf_Shdr &Section) const;
  132   Expected<StringRef> getStringTableForSymtab(const Elf_Shdr &Section,
  135   Expected<ArrayRef<Elf_Word>> getSHNDXTable(const Elf_Shdr &Section) const;
  136   Expected<ArrayRef<Elf_Word>> getSHNDXTable(const Elf_Shdr &Section,
  148   Expected<const Elf_Sym *> getRelocationSymbol(const Elf_Rel *Rel,
  151   static Expected<ELFFile> create(StringRef Object);
  164   Expected<Elf_Shdr_Range> sections() const;
  166   Expected<Elf_Dyn_Range> dynamicEntries() const;
  168   Expected<const uint8_t *> toMappedAddr(uint64_t VAddr) const;
  170   Expected<Elf_Sym_Range> symbols(const Elf_Shdr *Sec) const {
  176   Expected<Elf_Rela_Range> relas(const Elf_Shdr *Sec) const {
  180   Expected<Elf_Rel_Range> rels(const Elf_Shdr *Sec) const {
  184   Expected<Elf_Relr_Range> relrs(const Elf_Shdr *Sec) const {
  188   Expected<std::vector<Elf_Rela>> decode_relrs(Elf_Relr_Range relrs) const;
  190   Expected<std::vector<Elf_Rela>> android_relas(const Elf_Shdr *Sec) const;
  193   Expected<Elf_Phdr_Range> program_headers() const {
  278   Expected<StringRef> getSectionStringTable(
  281   Expected<uint32_t> getSectionIndex(const Elf_Sym *Sym, Elf_Sym_Range Syms,
  283   Expected<const Elf_Shdr *> getSection(const Elf_Sym *Sym,
  286   Expected<const Elf_Shdr *> getSection(const Elf_Sym *Sym,
  289   Expected<const Elf_Shdr *> getSection(uint32_t Index) const;
  291   Expected<const Elf_Sym *> getSymbol(const Elf_Shdr *Sec,
  294   Expected<StringRef>
  297   Expected<StringRef> getSectionName(const Elf_Shdr *Section,
  300   Expected<ArrayRef<T>> getSectionContentsAsArray(const Elf_Shdr *Sec) const;
  301   Expected<ArrayRef<uint8_t>> getSectionContents(const Elf_Shdr *Sec) const;
  310 inline Expected<const typename ELFT::Shdr *>
  318 inline Expected<uint32_t>
  335 Expected<uint32_t>
  352 Expected<const typename ELFT::Shdr *>
  362 Expected<const typename ELFT::Shdr *>
  375 Expected<const typename ELFT::Sym *>
  391 Expected<ArrayRef<T>>
  421 Expected<ArrayRef<uint8_t>>
  468 Expected<const typename ELFT::Sym *>
  478 Expected<StringRef>
  496 Expected<ELFFile<ELFT>> ELFFile<ELFT>::create(StringRef Object) {
  505 Expected<typename ELFT::ShdrRange> ELFFile<ELFT>::sections() const {
  555 Expected<const T *> ELFFile<ELFT>::getEntry(uint32_t Section,
  565 Expected<const T *> ELFFile<ELFT>::getEntry(const Elf_Shdr *Section,
  581 Expected<const typename ELFT::Shdr *>
  590 Expected<StringRef>
  616 Expected<ArrayRef<typename ELFT::Word>>
  625 Expected<ArrayRef<typename ELFT::Word>>
  654 Expected<StringRef>
  663 Expected<StringRef>
  678 Expected<StringRef>
  691 Expected<StringRef> ELFFile<ELFT>::getSectionName(const Elf_Shdr *Section,
include/llvm/Object/ELFObjectFile.h
   66   virtual Expected<int64_t> getRelocationAddend(DataRefImpl Rel) const = 0;
  198   Expected<int64_t> getAddend() const {
  259   Expected<StringRef> getSymbolName(DataRefImpl Symb) const override;
  260   Expected<uint64_t> getSymbolAddress(DataRefImpl Symb) const override;
  268   Expected<SymbolRef::Type> getSymbolType(DataRefImpl Symb) const override;
  269   Expected<section_iterator> getSymbolSection(const Elf_Sym *Symb,
  271   Expected<section_iterator> getSymbolSection(DataRefImpl Symb) const override;
  274   Expected<StringRef> getSectionName(DataRefImpl Sec) const override;
  278   Expected<ArrayRef<uint8_t>>
  291   Expected<section_iterator>
  397   static Expected<ELFObjectFile<ELFT>> create(MemoryBufferRef Object);
  422   Expected<int64_t> getRelocationAddend(DataRefImpl Rel) const override;
  427   Expected<uint64_t> getStartAddress() const override;
  455 Expected<StringRef> ELFObjectFile<ELFT>::getSymbolName(DataRefImpl Sym) const {
  468   Expected<StringRef> Name = ESym->getName(*SymStrTabOrErr);
  474     if (Expected<section_iterator> SecOrErr = getSymbolSection(Sym)) {
  514 Expected<uint64_t>
  586 Expected<SymbolRef::Type>
  634     if (Expected<StringRef> NameOrErr = getSymbolName(Sym)) {
  663 Expected<section_iterator>
  680 Expected<section_iterator>
  697 Expected<StringRef> ELFObjectFile<ELFT>::getSectionName(DataRefImpl Sec) const {
  723 Expected<ArrayRef<uint8_t>>
  845 Expected<section_iterator>
  855   Expected<const Elf_Shdr *> SecOrErr = EF.getSection(EShdr->sh_info);
  917 Expected<int64_t>
  945 Expected<ELFObjectFile<ELFT>>
 1195 Expected<uint64_t> ELFObjectFile<ELFT>::getStartAddress() const {
include/llvm/Object/ELFTypes.h
  244   Expected<StringRef> getName(StringRef StrTab) const;
  248 Expected<StringRef> Elf_Sym_Impl<ELFT>::getName(StringRef StrTab) const {
include/llvm/Object/IRObjectFile.h
   64   static Expected<MemoryBufferRef> findBitcodeInObject(const ObjectFile &Obj);
   69   static Expected<MemoryBufferRef>
   72   static Expected<std::unique_ptr<IRObjectFile>> create(MemoryBufferRef Object,
   85 Expected<IRSymtabFile> readIRSymtab(MemoryBufferRef MBRef);
include/llvm/Object/IRSymtab.h
  368 Expected<FileContents> readBitcode(const BitcodeFileContents &BFC);
include/llvm/Object/MachO.h
  271   static Expected<std::unique_ptr<MachOObjectFile>>
  278   Expected<StringRef> getSymbolName(DataRefImpl Symb) const override;
  286   Expected<uint64_t> getSymbolAddress(DataRefImpl Symb) const override;
  289   Expected<SymbolRef::Type> getSymbolType(DataRefImpl Symb) const override;
  291   Expected<section_iterator> getSymbolSection(DataRefImpl Symb) const override;
  296   Expected<StringRef> getSectionName(DataRefImpl Sec) const override;
  301   Expected<ArrayRef<uint8_t>>
  304   Expected<SectionRef> getSection(unsigned SectionIndex) const;
  305   Expected<SectionRef> getSection(StringRef SectionName) const;
include/llvm/Object/MachOUniversal.h
  114     Expected<std::unique_ptr<MachOObjectFile>> getAsObjectFile() const;
  116     Expected<std::unique_ptr<Archive>> getAsArchive() const;
  140   static Expected<std::unique_ptr<MachOUniversalBinary>>
  162   Expected<ObjectForArch>
  165   Expected<std::unique_ptr<MachOObjectFile>>
  168   Expected<std::unique_ptr<Archive>>
include/llvm/Object/Minidump.h
   28   static Expected<std::unique_ptr<MinidumpFile>> create(MemoryBufferRef Source);
   49   Expected<ArrayRef<uint8_t>>
   56   Expected<std::string> getString(size_t Offset) const;
   62   Expected<const minidump::SystemInfo &> getSystemInfo() const {
   71   Expected<ArrayRef<minidump::Module>> getModuleList() const {
   80   Expected<ArrayRef<minidump::Thread>> getThreadList() const {
   88   Expected<const minidump::ExceptionStream &> getExceptionStream() const {
  100   Expected<ArrayRef<minidump::MemoryDescriptor>> getMemoryList() const {
  141   Expected<iterator_range<MemoryInfoIterator>> getMemoryInfoList() const;
  154   static Expected<ArrayRef<uint8_t>> getDataSlice(ArrayRef<uint8_t> Data,
  161   static Expected<ArrayRef<T>> getDataSliceAs(ArrayRef<uint8_t> Data,
  177   Expected<const T &> getStream(minidump::StreamType Stream) const;
  182   Expected<ArrayRef<T>> getListStream(minidump::StreamType Stream) const;
  190 Expected<const T &> MinidumpFile::getStream(minidump::StreamType Type) const {
  200 Expected<ArrayRef<T>> MinidumpFile::getDataSliceAs(ArrayRef<uint8_t> Data,
  206   Expected<ArrayRef<uint8_t>> Slice =
include/llvm/Object/ObjectFile.h
   97   Expected<StringRef> getName() const;
  101   Expected<StringRef> getContents() const;
  133   Expected<section_iterator> getRelocatedSection() const;
  179   Expected<StringRef> getName() const;
  182   Expected<uint64_t> getAddress() const;
  191   Expected<SymbolRef::Type> getType() const;
  195   Expected<section_iterator> getSection() const;
  241   virtual Expected<StringRef> getSymbolName(DataRefImpl Symb) const = 0;
  244   virtual Expected<uint64_t> getSymbolAddress(DataRefImpl Symb) const = 0;
  248   virtual Expected<SymbolRef::Type> getSymbolType(DataRefImpl Symb) const = 0;
  249   virtual Expected<section_iterator>
  256   virtual Expected<StringRef> getSectionName(DataRefImpl Sec) const = 0;
  260   virtual Expected<ArrayRef<uint8_t>>
  275   virtual Expected<section_iterator> getRelocatedSection(DataRefImpl Sec) const;
  322   virtual Expected<uint64_t> getStartAddress() const {
  339   static Expected<OwningBinary<ObjectFile>>
  342   static Expected<std::unique_ptr<ObjectFile>>
  344   static Expected<std::unique_ptr<ObjectFile>>
  353   static Expected<std::unique_ptr<COFFObjectFile>>
  356   static Expected<std::unique_ptr<ObjectFile>>
  359   static Expected<std::unique_ptr<ObjectFile>>
  362   static Expected<std::unique_ptr<MachOObjectFile>>
  367   static Expected<std::unique_ptr<WasmObjectFile>>
  375 inline Expected<StringRef> SymbolRef::getName() const {
  379 inline Expected<uint64_t> SymbolRef::getAddress() const {
  395 inline Expected<section_iterator> SymbolRef::getSection() const {
  399 inline Expected<SymbolRef::Type> SymbolRef::getType() const {
  432 inline Expected<StringRef> SectionRef::getName() const {
  448 inline Expected<StringRef> SectionRef::getContents() const {
  449   Expected<ArrayRef<uint8_t>> Res =
  504 inline Expected<section_iterator> SectionRef::getRelocatedSection() const {
include/llvm/Object/SymbolicFile.h
  163   static Expected<std::unique_ptr<SymbolicFile>>
  167   static Expected<std::unique_ptr<SymbolicFile>>
  171   static Expected<OwningBinary<SymbolicFile>>
include/llvm/Object/TapiUniversal.h
   58     Expected<std::unique_ptr<TapiFile>> getAsObjectFile() const;
   83   static Expected<std::unique_ptr<TapiUniversal>>
include/llvm/Object/Wasm.h
  162   Expected<StringRef> getSymbolName(DataRefImpl Symb) const override;
  164   Expected<uint64_t> getSymbolAddress(DataRefImpl Symb) const override;
  169   Expected<SymbolRef::Type> getSymbolType(DataRefImpl Symb) const override;
  170   Expected<section_iterator> getSymbolSection(DataRefImpl Symb) const override;
  174   Expected<StringRef> getSectionName(DataRefImpl Sec) const override;
  178   Expected<ArrayRef<uint8_t>>
include/llvm/Object/WindowsResource.h
  121   static Expected<ResourceEntryRef> create(BinaryStreamRef Ref,
  138   Expected<ResourceEntryRef> getHeadEntry();
  142   static Expected<std::unique_ptr<WindowsResource>>
  262 Expected<std::unique_ptr<MemoryBuffer>>
include/llvm/Object/XCOFFObjectFile.h
  212   Expected<StringRef> getStringTableEntry(uint32_t Offset) const;
  220   static Expected<std::unique_ptr<XCOFFObjectFile>> create(unsigned Type,
  225   static Expected<XCOFFStringTable> parseStringTable(const XCOFFObjectFile *Obj,
  229   friend Expected<std::unique_ptr<ObjectFile>>
  241   Expected<StringRef> getSymbolName(DataRefImpl Symb) const override;
  242   Expected<uint64_t> getSymbolAddress(DataRefImpl Symb) const override;
  245   Expected<SymbolRef::Type> getSymbolType(DataRefImpl Symb) const override;
  246   Expected<section_iterator> getSymbolSection(DataRefImpl Symb) const override;
  249   Expected<StringRef> getSectionName(DataRefImpl Sec) const override;
  253   Expected<ArrayRef<uint8_t>>
  278   Expected<uint64_t> getStartAddress() const override;
  289   Expected<StringRef>
  313   Expected<StringRef> getSymbolNameByIndex(uint32_t SymbolTableIndex) const;
  315   Expected<StringRef> getCFileName(const XCOFFFileAuxEnt *CFileEntPtr) const;
  324   Expected<DataRefImpl> getSectionByNum(int16_t Num) const;
  329   Expected<uint32_t>
  332   Expected<ArrayRef<XCOFFRelocation32>>
include/llvm/ObjectYAML/CodeViewYAMLDebugSections.h
  111   static Expected<YAMLDebugSubsection>
  120 Expected<std::vector<std::shared_ptr<codeview::DebugSubsection>>>
include/llvm/ObjectYAML/CodeViewYAMLSymbols.h
   39   static Expected<SymbolRecord> fromCodeViewSymbol(codeview::CVSymbol Symbol);
include/llvm/ObjectYAML/CodeViewYAMLTypes.h
   50   static Expected<LeafRecord> fromCodeViewRecord(codeview::CVType Type);
include/llvm/ObjectYAML/DWARFEmitter.h
   40 Expected<StringMap<std::unique_ptr<MemoryBuffer>>>
include/llvm/ObjectYAML/MinidumpYAML.h
   52   static Expected<std::unique_ptr<Stream>>
  218   static Expected<Object> create(const object::MinidumpFile &File);
include/llvm/Passes/PassPlugin.h
   67   static Expected<PassPlugin> Load(const std::string &Filename);
include/llvm/ProfileData/Coverage/CoverageMapping.h
  297   Expected<int64_t> evaluate(const Counter &C) const;
  537   static Expected<std::unique_ptr<CoverageMapping>>
  544   static Expected<std::unique_ptr<CoverageMapping>>
include/llvm/ProfileData/Coverage/CoverageMappingReader.h
   76   Expected<CoverageMappingRecord &> operator*() {
   84   Expected<CoverageMappingRecord *> operator->() {
  137   Expected<bool> isDummy();
  206   static Expected<std::vector<std::unique_ptr<BinaryCoverageReader>>>
  210   static Expected<std::unique_ptr<BinaryCoverageReader>>
include/llvm/ProfileData/InstrProfData.inc
  378   static Expected<std::unique_ptr<ValueProfData>>
include/llvm/ProfileData/InstrProfReader.h
  129   static Expected<std::unique_ptr<InstrProfReader>> create(const Twine &Path);
  131   static Expected<std::unique_ptr<InstrProfReader>>
  474   Expected<InstrProfRecord> getInstrProfRecord(StringRef FuncName,
  494   static Expected<std::unique_ptr<IndexedInstrProfReader>>
  497   static Expected<std::unique_ptr<IndexedInstrProfReader>>
include/llvm/Remarks/BitstreamRemarkParser.h
   97   Expected<std::array<char, 4>> parseMagic();
  103   Expected<bool> isMetaBlock();
  106   Expected<bool> isRemarkBlock();
include/llvm/Remarks/RemarkFormat.h
   28 Expected<Format> parseFormat(StringRef FormatStr);
include/llvm/Remarks/RemarkParser.h
   52   virtual Expected<std::unique_ptr<Remark>> next() = 0;
   75   Expected<StringRef> operator[](size_t Index) const;
   78 Expected<std::unique_ptr<RemarkParser>> createRemarkParser(Format ParserFormat,
   81 Expected<std::unique_ptr<RemarkParser>>
   85 Expected<std::unique_ptr<RemarkParser>>
include/llvm/Remarks/RemarkSerializer.h
   76 Expected<std::unique_ptr<RemarkSerializer>>
   81 Expected<std::unique_ptr<RemarkSerializer>>
include/llvm/Support/BinaryItemStream.h
   86   Expected<uint32_t> translateOffsetIndex(uint32_t Offset) {
include/llvm/Support/CachePruning.h
   67 Expected<CachePruningPolicy> parseCachePruningPolicy(StringRef PolicyStr);
include/llvm/Support/Error.h
  487   Expected(Expected &&Other) { moveConstruct(std::move(Other)); }
  492   Expected(Expected<OtherT> &&Other,
  502       Expected<OtherT> &&Other,
  509   Expected &operator=(Expected &&Other) {
  509   Expected &operator=(Expected &&Other) {
  594   template <class OtherT> void moveConstruct(Expected<OtherT> &&Other) {
  607   template <class OtherT> void moveAssign(Expected<OtherT> &&Other) {
  613     this->~Expected();
  614     new (this) Expected(std::move(Other));
  731 T cantFail(Expected<T> ValOrErr, const char *Msg = nullptr) {
  762 T& cantFail(Expected<T&> ValOrErr, const char *Msg = nullptr) {
  959 Expected<T> handleExpected(Expected<T> ValOrErr, RecoveryFtor &&RecoveryPath,
  959 Expected<T> handleExpected(Expected<T> ValOrErr, RecoveryFtor &&RecoveryPath,
 1012 template <typename T> Optional<T> expectedToOptional(Expected<T> &&E) {
 1079   ExpectedAsOutParameter(Expected<T> *ValOrErr)
 1091   Expected<T> *ValOrErr;
 1137 template <typename T> Expected<T> errorOrToExpected(ErrorOr<T> &&EO) {
 1144 template <typename T> ErrorOr<T> expectedToErrorOr(Expected<T> &&E) {
 1313   template <typename T> T operator()(Expected<T> &&E) const {
 1320   template <typename T> T& operator()(Expected<T&> &&E) const {
include/llvm/Support/FileOutputBuffer.h
   46   static Expected<std::unique_ptr<FileOutputBuffer>>
include/llvm/Support/FileSystem.h
  851   static Expected<TempFile> create(const Twine &Model,
  969 Expected<file_t> openNativeFile(const Twine &Name, CreationDisposition Disp,
 1001 Expected<size_t> readNativeFile(file_t FileHandle, MutableArrayRef<char> Buf);
 1012 Expected<size_t> readNativeFileSlice(file_t FileHandle,
 1051 inline Expected<file_t> openNativeFileForWrite(const Twine &Name,
 1093 inline Expected<file_t> openNativeFileForReadWrite(const Twine &Name,
 1130 Expected<file_t>
include/llvm/Support/GlobPattern.h
   31   static Expected<GlobPattern> create(StringRef Pat);
include/llvm/Support/JSON.h
  680 llvm::Expected<Value> parse(llvm::StringRef JSON);
include/llvm/Support/MSVCErrorWorkarounds.h
   43 template <typename T> class MSVCPExpected : public Expected<T> {
   46       : Expected<T>(make_error<StringError>("", inconvertibleErrorCode())) {
   50   MSVCPExpected(MSVCPExpected &&Other) : Expected<T>(std::move(Other)) {}
   53     Expected<T>::operator=(std::move(Other));
   57   MSVCPExpected(Error Err) : Expected<T>(std::move(Err)) {}
   64       : Expected<T>(std::move(Val)) {}
   68       Expected<OtherT> &&Other,
   71       : Expected<T>(std::move(Other)) {}
   75       Expected<OtherT> &&Other,
   78       : Expected<T>(std::move(Other)) {}
include/llvm/Support/Process.h
   50   static Expected<unsigned> getPageSize();
include/llvm/Support/TarWriter.h
   20   static Expected<std::unique_ptr<TarWriter>> create(StringRef OutputPath,
include/llvm/Testing/Support/Error.h
   23 template <typename T> ExpectedHolder<T> TakeExpected(Expected<T> &Exp) {
   27 template <typename T> ExpectedHolder<T> TakeExpected(Expected<T> &&Exp) {
include/llvm/Testing/Support/SupportHelpers.h
   30   ExpectedHolder(ErrorHolder Err, Expected<T> &Exp)
   33   Expected<T> &Exp;
include/llvm/TextAPI/ELF/TBEHandler.h
   36 Expected<std::unique_ptr<ELFStub>> readTBEFromBuffer(StringRef Buf);
include/llvm/TextAPI/MachO/Target.h
   32   static llvm::Expected<Target> create(StringRef Target);
include/llvm/TextAPI/MachO/TextAPIReader.h
   22   static Expected<std::unique_ptr<InterfaceFile>>
include/llvm/Transforms/IPO/FunctionImport.h
  105       std::function<Expected<std::unique_ptr<Module>>(StringRef Identifier)>;
  112   Expected<bool> importFunctions(Module &M, const ImportMapTy &ImportList);
include/llvm/XRay/FDRRecordProducer.h
   23   virtual Expected<std::unique_ptr<Record>> produce() = 0;
   35   Expected<std::unique_ptr<Record>> findNextBufferExtent();
   44   Expected<std::unique_ptr<Record>> produce() override;
include/llvm/XRay/FileHeaderReader.h
   26 Expected<XRayFileHeader> readBinaryFormatHeader(DataExtractor &HeaderExtractor,
include/llvm/XRay/Graph.h
  398   Expected<VertexAttribute &> at(const VertexIdentifier &I) {
  407   Expected<const VertexAttribute &> at(const VertexIdentifier &I) const {
  417   Expected<EdgeAttribute &> at(const EdgeIdentifier &I) {
  426   Expected<const EdgeAttribute &> at(const EdgeIdentifier &I) const {
include/llvm/XRay/InstrumentationMap.h
   34 Expected<InstrumentationMap> loadInstrumentationMap(StringRef Filename);
   83   friend Expected<InstrumentationMap> loadInstrumentationMap(StringRef);
include/llvm/XRay/Profile.h
   37 Expected<Profile> loadProfile(StringRef Filename);
   48 Expected<Profile> profileFromTrace(const Trace &T);
   71   Expected<std::vector<FuncID>> expandPath(PathID P) const;
include/llvm/XRay/Trace.h
   53   friend Expected<Trace> loadTrace(const DataExtractor &, bool);
   71 Expected<Trace> loadTraceFile(StringRef Filename, bool Sort = false);
   75 Expected<Trace> loadTrace(const DataExtractor &Extractor, bool Sort = false);
lib/BinaryFormat/MsgPackReader.cpp
   28 Expected<bool> Reader::read(Object &Obj) {
  181 template <class T> Expected<bool> Reader::readRaw(Object &Obj) {
  191 template <class T> Expected<bool> Reader::readInt(Object &Obj) {
  201 template <class T> Expected<bool> Reader::readUInt(Object &Obj) {
  211 template <class T> Expected<bool> Reader::readLength(Object &Obj) {
  221 template <class T> Expected<bool> Reader::readExt(Object &Obj) {
  231 Expected<bool> Reader::createRaw(Object &Obj, uint32_t Size) {
  241 Expected<bool> Reader::createExt(Object &Obj, uint32_t Size) {
lib/Bitcode/Reader/BitReader.cpp
   42   Expected<std::unique_ptr<Module>> ModuleOrErr = parseBitcodeFile(Buf, Ctx);
   83   Expected<std::unique_ptr<Module>> ModuleOrErr =
lib/Bitcode/Reader/BitcodeAnalyzer.cpp
  407 static Expected<CurStreamTypeType> ReadSignature(BitstreamCursor &Stream) {
  409     if (Expected<SimpleBitstreamCursor::word_t> MaybeWord = Stream.Read(size))
  460 static Expected<CurStreamTypeType> analyzeHeader(Optional<BCDumpOptions> O,
  523     Expected<uint32_t> MaybeSize = R.ReadVBR(6);
  549   Expected<CurStreamTypeType> MaybeType = analyzeHeader(O, Stream);
  561     Expected<CurStreamTypeType> H = analyzeHeader(O, BlockInfoCursor);
  566       Expected<unsigned> MaybeCode = BlockInfoCursor.ReadCode();
  572       Expected<unsigned> MaybeBlockID = BlockInfoCursor.ReadSubBlockID();
  576         Expected<Optional<BitstreamBlockInfo>> MaybeNewBlockInfo =
  595     Expected<unsigned> MaybeCode = Stream.ReadCode();
  601     Expected<unsigned> MaybeBlockID = Stream.ReadSubBlockID();
  740     Expected<Optional<BitstreamBlockInfo>> MaybeNewBlockInfo =
  790     Expected<BitstreamEntry> MaybeEntry =
  841     Expected<unsigned> MaybeCode = Stream.readRecord(Entry.ID, Record, &Blob);
  984     if (Expected<unsigned> Skipped = Stream.skipRecord(Entry.ID))
lib/Bitcode/Reader/BitcodeReader.cpp
  113     if (Expected<SimpleBitstreamCursor::word_t> Res = Stream.Read(8)) {
  120     if (Expected<SimpleBitstreamCursor::word_t> Res = Stream.Read(4)) {
  129 static Expected<BitstreamCursor> initStream(MemoryBufferRef Buffer) {
  173 static Expected<std::string> readIdentificationBlock(BitstreamCursor &Stream) {
  184     if (Expected<BitstreamEntry> Res = Stream.advance())
  202     Expected<unsigned> MaybeBitCode = Stream.readRecord(Entry.ID, Record);
  223 static Expected<std::string> readIdentificationCode(BitstreamCursor &Stream) {
  231     if (Expected<BitstreamEntry> Res = Stream.advance())
  250       if (Expected<unsigned> Skipped = Stream.skipRecord(Entry.ID))
  258 static Expected<bool> hasObjCCategoryInModule(BitstreamCursor &Stream) {
  266     Expected<BitstreamEntry> MaybeEntry = Stream.advanceSkippingSubblocks();
  283     Expected<unsigned> MaybeRecord = Stream.readRecord(Entry.ID, Record);
  305 static Expected<bool> hasObjCCategory(BitstreamCursor &Stream) {
  310     if (Expected<BitstreamEntry> Res = Stream.advance())
  331       if (Expected<unsigned> Skipped = Stream.skipRecord(Entry.ID))
  339 static Expected<std::string> readModuleTriple(BitstreamCursor &Stream) {
  349     Expected<BitstreamEntry> MaybeEntry = Stream.advanceSkippingSubblocks();
  366     Expected<unsigned> MaybeRecord = Stream.readRecord(Entry.ID, Record);
  384 static Expected<std::string> readTriple(BitstreamCursor &Stream) {
  388     Expected<BitstreamEntry> MaybeEntry = Stream.advance();
  409       if (llvm::Expected<unsigned> Skipped = Stream.skipRecord(Entry.ID))
  434   Expected<unsigned> parseVersionRecord(ArrayRef<uint64_t> Record);
  460 Expected<unsigned>
  742   Expected<Value *> recordValue(SmallVectorImpl<uint64_t> &Record,
 1361     Expected<BitstreamEntry> MaybeEntry = Stream.advanceSkippingSubblocks();
 1379     Expected<unsigned> MaybeRecord = Stream.readRecord(Entry.ID, Record);
 1574     Expected<BitstreamEntry> MaybeEntry = Stream.advanceSkippingSubblocks();
 1592     Expected<unsigned> MaybeRecord = Stream.readRecord(Entry.ID, Record);
 1688     Expected<BitstreamEntry> MaybeEntry = Stream.advanceSkippingSubblocks();
 1709     Expected<unsigned> MaybeRecord = Stream.readRecord(Entry.ID, Record);
 1931     Expected<BitstreamEntry> MaybeEntry = Stream.advanceSkippingSubblocks();
 1949     Expected<unsigned> MaybeRecord = Stream.readRecord(Entry.ID, Record);
 1972     Expected<BitstreamEntry> MaybeEntry = Stream.advanceSkippingSubblocks();
 1993     Expected<unsigned> MaybeRecord = Stream.readRecord(Entry.ID, Record);
 2009 Expected<Value *> BitcodeReader::recordValue(SmallVectorImpl<uint64_t> &Record,
 2037 static Expected<uint64_t> jumpToValueSymbolTable(uint64_t Offset,
 2044   Expected<BitstreamEntry> MaybeEntry = Stream.advance();
 2078     Expected<BitstreamEntry> MaybeEntry = Stream.advanceSkippingSubblocks();
 2094     Expected<unsigned> MaybeRecord = Stream.readRecord(Entry.ID, Record);
 2114     Expected<uint64_t> MaybeCurrentBit = jumpToValueSymbolTable(Offset, Stream);
 2155     Expected<BitstreamEntry> MaybeEntry = Stream.advanceSkippingSubblocks();
 2176     Expected<unsigned> MaybeRecord = Stream.readRecord(Entry.ID, Record);
 2183       Expected<Value *> ValOrErr = recordValue(Record, 1, TT);
 2191       Expected<Value *> ValOrErr = recordValue(Record, 2, TT);
 2335     Expected<BitstreamEntry> MaybeEntry = Stream.advanceSkippingSubblocks();
 2361     Expected<unsigned> MaybeBitCode = Stream.readRecord(Entry.ID, Record);
 2837     Expected<BitstreamEntry> MaybeEntry = Stream.advanceSkippingSubblocks();
 2856     Expected<unsigned> MaybeRecord = Stream.readRecord(Entry.ID, Record);
 3019     Expected<llvm::BitstreamEntry> MaybeEntry = Stream.advance();
 3042   Expected<Optional<BitstreamBlockInfo>> MaybeNewBlockInfo =
 3414     Expected<llvm::BitstreamEntry> MaybeEntry = Stream.advance();
 3560     Expected<unsigned> MaybeBitCode = Stream.readRecord(Entry.ID, Record);
 3566       Expected<unsigned> VersionOrErr = parseVersionRecord(Record);
 3734     Expected<llvm::BitstreamEntry> MaybeEntry = Stream.advance();
 3786     Expected<unsigned> MaybeBitCode = Stream.readRecord(Entry.ID, Record);
 5404   Expected<uint64_t> MaybeCurrentBit = jumpToValueSymbolTable(Offset, Stream);
 5418     Expected<BitstreamEntry> MaybeEntry = Stream.advanceSkippingSubblocks();
 5439     Expected<unsigned> MaybeRecord = Stream.readRecord(Entry.ID, Record);
 5499     Expected<llvm::BitstreamEntry> MaybeEntry = Stream.advance();
 5559         Expected<unsigned> MaybeBitCode = Stream.readRecord(Entry.ID, Record);
 5752     Expected<BitstreamEntry> MaybeEntry = Stream.advanceSkippingSubblocks();
 5759     Expected<unsigned> MaybeRecord = Stream.readRecord(Entry.ID, Record);
 5787     Expected<BitstreamEntry> MaybeEntry = Stream.advanceSkippingSubblocks();
 5811     Expected<unsigned> MaybeBitCode = Stream.readRecord(Entry.ID, Record);
 6190     Expected<BitstreamEntry> MaybeEntry = Stream.advanceSkippingSubblocks();
 6207     Expected<unsigned> MaybeRecord = Stream.readRecord(Entry.ID, Record);
 6274 static Expected<StringRef> readBlobInRecord(BitstreamCursor &Stream,
 6281     Expected<llvm::BitstreamEntry> MaybeEntry = Stream.advance();
 6301       Expected<unsigned> MaybeRecord =
 6316 Expected<std::vector<BitcodeModule>>
 6324 Expected<BitcodeFileContents>
 6326   Expected<BitstreamCursor> StreamOrErr = initStream(Buffer);
 6341     Expected<llvm::BitstreamEntry> MaybeEntry = Stream.advance();
 6359           Expected<llvm::BitstreamEntry> MaybeEntry = Stream.advance();
 6383         Expected<StringRef> Strtab =
 6405         Expected<StringRef> SymtabOrErr =
 6426       if (Expected<unsigned> StreamFailed = Stream.skipRecord(Entry.ID))
 6442 Expected<std::unique_ptr<Module>>
 6451     Expected<std::string> ProducerIdentificationOrErr =
 6485 Expected<std::unique_ptr<Module>>
 6507 Expected<std::unique_ptr<ModuleSummaryIndex>> BitcodeModule::getSummary() {
 6522 static Expected<bool> getEnableSplitLTOUnitFlag(BitstreamCursor &Stream,
 6529     Expected<BitstreamEntry> MaybeEntry = Stream.advanceSkippingSubblocks();
 6549     Expected<unsigned> MaybeBitCode = Stream.readRecord(Entry.ID, Record);
 6568 Expected<BitcodeLTOInfo> BitcodeModule::getLTOInfo() {
 6577     Expected<llvm::BitstreamEntry> MaybeEntry = Stream.advance();
 6591         Expected<bool> EnableSplitLTOUnit =
 6600         Expected<bool> EnableSplitLTOUnit =
 6614       if (Expected<unsigned> StreamFailed = Stream.skipRecord(Entry.ID))
 6622 static Expected<BitcodeModule> getSingleModule(MemoryBufferRef Buffer) {
 6623   Expected<std::vector<BitcodeModule>> MsOrErr = getBitcodeModuleList(Buffer);
 6633 Expected<std::unique_ptr<Module>>
 6636   Expected<BitcodeModule> BM = getSingleModule(Buffer);
 6643 Expected<std::unique_ptr<Module>> llvm::getOwningLazyBitcodeModule(
 6653 Expected<std::unique_ptr<Module>>
 6660 Expected<std::unique_ptr<Module>> llvm::parseBitcodeFile(MemoryBufferRef Buffer,
 6662   Expected<BitcodeModule> BM = getSingleModule(Buffer);
 6669 Expected<std::string> llvm::getBitcodeTargetTriple(MemoryBufferRef Buffer) {
 6670   Expected<BitstreamCursor> StreamOrErr = initStream(Buffer);
 6677 Expected<bool> llvm::isBitcodeContainingObjCCategory(MemoryBufferRef Buffer) {
 6678   Expected<BitstreamCursor> StreamOrErr = initStream(Buffer);
 6685 Expected<std::string> llvm::getBitcodeProducerString(MemoryBufferRef Buffer) {
 6686   Expected<BitstreamCursor> StreamOrErr = initStream(Buffer);
 6696   Expected<BitcodeModule> BM = getSingleModule(Buffer);
 6703 Expected<std::unique_ptr<ModuleSummaryIndex>>
 6705   Expected<BitcodeModule> BM = getSingleModule(Buffer);
 6712 Expected<BitcodeLTOInfo> llvm::getBitcodeLTOInfo(MemoryBufferRef Buffer) {
 6713   Expected<BitcodeModule> BM = getSingleModule(Buffer);
 6720 Expected<std::unique_ptr<ModuleSummaryIndex>>
lib/Bitcode/Reader/MetadataLoader.cpp
  447   Expected<bool> lazyLoadModuleMetadataBlock();
  683 Expected<bool>
  689     Expected<BitstreamEntry> MaybeEntry = IndexCursor.advanceSkippingSubblocks(
  706       Expected<unsigned> MaybeCode = IndexCursor.skipRecord(Entry.ID);
  717         if (Expected<unsigned> MaybeRecord =
  737         if (Expected<unsigned> MaybeRecord =
  748         Expected<BitstreamEntry> MaybeEntry =
  758         if (Expected<unsigned> MaybeCode =
  785         if (Expected<unsigned> MaybeCode =
  794         if (Expected<unsigned> MaybeCode = IndexCursor.ReadCode())
  802         if (Expected<unsigned> MaybeNextBitCode =
  828         if (Expected<unsigned> MaybeRecord =
  943     Expected<BitstreamEntry> MaybeEntry = Stream.advanceSkippingSubblocks();
  965     if (Expected<unsigned> MaybeCode =
 1000   Expected<BitstreamEntry> MaybeEntry = IndexCursor.advanceSkippingSubblocks();
 1007   if (Expected<unsigned> MaybeCode =
 1111     Expected<unsigned> MaybeCode = Stream.ReadCode();
 1117     if (Expected<unsigned> MaybeNextBitCode = Stream.readRecord(Code, Record)) {
 1947     Expected<uint32_t> MaybeSize = R.ReadVBR(6);
 1986     Expected<BitstreamEntry> MaybeEntry = Stream.advanceSkippingSubblocks();
 2006     Expected<unsigned> MaybeRecord = Stream.readRecord(Entry.ID, Record);
 2090     Expected<BitstreamEntry> MaybeEntry = Stream.advanceSkippingSubblocks();
 2109     Expected<unsigned> MaybeCode = Stream.readRecord(Entry.ID, Record);
lib/Bitstream/Reader/BitstreamReader.cpp
   36   Expected<uint32_t> MaybeVBR = ReadVBR(bitc::CodeLenWidth);
   48   Expected<word_t> MaybeNum = Read(bitc::BlockSizeWidth);
   67 static Expected<uint64_t> readAbbreviatedField(BitstreamCursor &Cursor,
   83     if (Expected<unsigned> Res = Cursor.Read(6))
  102     if (Expected<unsigned> Res = Cursor.Read((unsigned)Op.getEncodingData()))
  108     if (Expected<uint64_t> Res =
  114     if (Expected<unsigned> Res = Cursor.Read(6))
  123 Expected<unsigned> BitstreamCursor::skipRecord(unsigned AbbrevID) {
  126     Expected<uint32_t> MaybeCode = ReadVBR(6);
  130     Expected<uint32_t> MaybeVBR = ReadVBR(6);
  135       if (Expected<uint64_t> Res = ReadVBR64(6))
  153     Expected<uint64_t> MaybeCode = readAbbreviatedField(*this, CodeOp);
  173       Expected<uint32_t> MaybeNum = ReadVBR(6);
  196           if (Expected<uint64_t> Res =
  212     Expected<uint32_t> MaybeNum = ReadVBR(6);
  235 Expected<unsigned> BitstreamCursor::readRecord(unsigned AbbrevID,
  239     Expected<uint32_t> MaybeCode = ReadVBR(6);
  243     Expected<uint32_t> MaybeNumElts = ReadVBR(6);
  249       if (Expected<uint64_t> MaybeVal = ReadVBR64(6))
  268     if (Expected<uint64_t> MaybeCode = readAbbreviatedField(*this, CodeOp))
  283       if (Expected<uint64_t> MaybeVal = readAbbreviatedField(*this, Op))
  292       Expected<uint32_t> MaybeNumElts = ReadVBR(6);
  311           if (Expected<SimpleBitstreamCursor::word_t> MaybeVal =
  319           if (Expected<uint64_t> MaybeVal =
  327           if (Expected<SimpleBitstreamCursor::word_t> MaybeVal = Read(6))
  337     Expected<uint32_t> MaybeNumElts = ReadVBR(6);
  377   Expected<uint32_t> MaybeNumOpInfo = ReadVBR(5);
  382     Expected<word_t> MaybeIsLiteral = Read(1);
  387       Expected<uint64_t> MaybeOp = ReadVBR64(8);
  394     Expected<word_t> MaybeEncoding = Read(3);
  400       Expected<uint64_t> MaybeData = ReadVBR64(5);
  431 Expected<Optional<BitstreamBlockInfo>>
  443     Expected<BitstreamEntry> MaybeEntry =
  475     Expected<unsigned> MaybeBlockInfo = readRecord(Entry.ID, Record);
lib/CodeGen/ParallelCG.cpp
   80                 Expected<std::unique_ptr<Module>> MOrErr = parseBitcodeFile(
lib/DebugInfo/CodeView/DebugStringTableSubsection.cpp
   34 Expected<StringRef>
lib/DebugInfo/CodeView/RecordSerialization.cpp
  151 Expected<CVSymbol> llvm::codeview::readSymbolFromStream(BinaryStreamRef Stream,
lib/DebugInfo/CodeView/TypeStreamMerger.cpp
  166   Expected<bool> shouldRemapType(const CVType &Type);
  478 Expected<bool> TypeStreamMerger::shouldRemapType(const CVType &Type) {
lib/DebugInfo/DWARF/DWARFAcceleratorTable.cpp
  439 Expected<DWARFDebugNames::AttributeEncoding>
  451 Expected<std::vector<DWARFDebugNames::AttributeEncoding>>
  465 Expected<DWARFDebugNames::Abbrev>
  599 Expected<DWARFDebugNames::Entry>
lib/DebugInfo/DWARF/DWARFContext.cpp
  836   Expected<const DWARFDebugLine::LineTable *> ExpectedLineTable =
  845 Expected<const DWARFDebugLine::LineTable *> DWARFContext::getLineTableForUnit(
 1238   Expected<OwningBinary<ObjectFile>> Obj = [&] {
 1287 static Expected<SymInfo> getSymbolInfo(const object::ObjectFile &Obj,
 1304     Expected<uint64_t> SymAddrOrErr = Sym->getAddress();
 1470     Expected<Decompressor> Decompressor =
 1530       Expected<section_iterator> SecOrErr = Section.getRelocatedSection();
 1544         Expected<StringRef> E = Section.getContents();
 1654         Expected<SymInfo> SymInfoOrErr =
lib/DebugInfo/DWARF/DWARFDebugAddr.cpp
  160 Expected<uint64_t> DWARFDebugAddrTable::getAddrEntry(uint32_t Index) const {
lib/DebugInfo/DWARF/DWARFDebugAranges.cpp
   56       Expected<DWARFAddressRangesVector> CURanges = CU->collectAddressRanges();
lib/DebugInfo/DWARF/DWARFDebugLine.cpp
  191 static llvm::Expected<ContentDescriptors>
  234   llvm::Expected<ContentDescriptors> DirDescriptors =
  270   llvm::Expected<ContentDescriptors> FileDescriptors = parseV5EntryFormat(
  511 Expected<const DWARFDebugLine::LineTable *> DWARFDebugLine::getOrParseLineTable(
lib/DebugInfo/DWARF/DWARFDebugLoc.cpp
   87 Expected<DWARFDebugLoc::LocationList>
  142 Expected<DWARFDebugLoclists::LocationList>
lib/DebugInfo/DWARF/DWARFDie.cpp
  473 Expected<DWARFAddressRangesVector> DWARFDie::getAddressRanges() const {
lib/DebugInfo/DWARF/DWARFUnit.cpp
  308 static Expected<DWARFDebugRnglistTable>
  554 Expected<DWARFAddressRangesVector>
  575 Expected<DWARFAddressRangesVector>
  588 Expected<DWARFAddressRangesVector> DWARFUnit::collectAddressRanges() {
  777 Expected<StrOffsetsContributionDescriptor>
  793 static Expected<StrOffsetsContributionDescriptor>
  811 static Expected<StrOffsetsContributionDescriptor>
  828 static Expected<StrOffsetsContributionDescriptor>
  856 Expected<Optional<StrOffsetsContributionDescriptor>>
  875 Expected<Optional<StrOffsetsContributionDescriptor>>
lib/DebugInfo/DWARF/DWARFVerifier.cpp
 1216   Expected<DWARFDebugNames::Entry> EntryOr = NI.getEntry(&NextEntryID);
lib/DebugInfo/GSYM/FunctionInfo.cpp
   32 llvm::Expected<FunctionInfo> FunctionInfo::decode(DataExtractor &Data,
   72         if (Expected<LineTable> LT = LineTable::decode(InfoData, BaseAddr))
   79         if (Expected<InlineInfo> II = InlineInfo::decode(InfoData, BaseAddr))
   95 llvm::Expected<uint64_t> FunctionInfo::encode(FileWriter &O) const {
lib/DebugInfo/GSYM/GsymCreator.cpp
  139     if (Expected<uint64_t> OffsetOrErr = FuncInfo.encode(O))
lib/DebugInfo/GSYM/GsymReader.cpp
   35 llvm::Expected<GsymReader> GsymReader::openFile(StringRef Filename) {
   45 llvm::Expected<GsymReader> GsymReader::copyBuffer(StringRef Bytes) {
   50 llvm::Expected<llvm::gsym::GsymReader>
  227 Expected<uint64_t>
  245 llvm::Expected<FunctionInfo> GsymReader::getFunctionInfo(uint64_t Addr) const {
  246   Expected<uint64_t> AddressIndex = getAddressIndex(Addr);
lib/DebugInfo/GSYM/Header.cpp
   64 llvm::Expected<Header> Header::decode(DataExtractor &Data) {
lib/DebugInfo/GSYM/InlineInfo.cpp
   73 static llvm::Expected<InlineInfo> decode(DataExtractor &Data, uint64_t &Offset,
  104       llvm::Expected<InlineInfo> Child = decode(Data, Offset, ChildBaseAddr);
  116 llvm::Expected<InlineInfo> InlineInfo::decode(DataExtractor &Data,
lib/DebugInfo/GSYM/LineTable.cpp
  251 llvm::Expected<LineTable> LineTable::decode(DataExtractor &Data,
lib/DebugInfo/MSF/MSFBuilder.cpp
   49 Expected<MSFBuilder> MSFBuilder::create(BumpPtrAllocator &Allocator,
  154 Expected<uint32_t> MSFBuilder::addStream(uint32_t Size,
  181 Expected<uint32_t> MSFBuilder::addStream(uint32_t Size) {
  250 Expected<MSFLayout> MSFBuilder::generateLayout() {
  338 Expected<FileBufferByteStream> MSFBuilder::commit(StringRef Path,
  340   Expected<MSFLayout> L = generateLayout();
lib/DebugInfo/PDB/Native/DbiModuleList.cpp
  268 Expected<StringRef> DbiModuleList::getFileName(uint32_t Index) const {
lib/DebugInfo/PDB/Native/DbiStream.cpp
  236 Expected<StringRef> DbiStream::getECName(uint32_t NI) const {
  259   Expected<std::unique_ptr<msf::MappedBlockStream>> ExpectedStream =
  285   Expected<std::unique_ptr<msf::MappedBlockStream>> ExpectedStream =
  309   Expected<std::unique_ptr<msf::MappedBlockStream>> ExpectedStream =
  325 Expected<std::unique_ptr<msf::MappedBlockStream>>
lib/DebugInfo/PDB/Native/DbiStreamBuilder.cpp
  113 Expected<DbiModuleDescriptorBuilder &>
  129 Expected<uint32_t> DbiStreamBuilder::getSourceFileNameIndex(StringRef File) {
lib/DebugInfo/PDB/Native/GSIStreamBuilder.cpp
  213   Expected<uint32_t> Idx = Msf.addStream(calculateGlobalsHashStreamSize());
lib/DebugInfo/PDB/Native/InfoStream.cpp
   88 Expected<uint32_t> InfoStream::getNamedStreamIndex(llvm::StringRef Name) const {
lib/DebugInfo/PDB/Native/ModuleDebugStream.cpp
  132 Expected<codeview::DebugChecksumsSubsectionRef>
lib/DebugInfo/PDB/Native/NativeEnumInjectedSources.cpp
   20 Expected<std::string> readStreamData(BinaryStream &Stream, uint32_t Limit) {
lib/DebugInfo/PDB/Native/NativeExeSymbol.cpp
   24   Expected<DbiStream &> DbiS = Session.getPDBFile().getPDBDbiStream();
lib/DebugInfo/PDB/Native/NativeSession.cpp
   44   Expected<DbiStream &> DbiS = File.getPDBDbiStream();
lib/DebugInfo/PDB/Native/PDBFile.cpp
  104 Expected<ArrayRef<uint8_t>> PDBFile::getBlockData(uint32_t BlockIndex,
  257 Expected<GlobalsStream &> PDBFile::getPDBGlobalsStream() {
  275 Expected<InfoStream &> PDBFile::getPDBInfoStream() {
  288 Expected<DbiStream &> PDBFile::getPDBDbiStream() {
  301 Expected<TpiStream &> PDBFile::getPDBTpiStream() {
  314 Expected<TpiStream &> PDBFile::getPDBIpiStream() {
  330 Expected<PublicsStream &> PDBFile::getPDBPublicsStream() {
  348 Expected<SymbolStream &> PDBFile::getPDBSymbolStream() {
  367 Expected<PDBStringTable &> PDBFile::getStringTable() {
  384 Expected<InjectedSourceStream &> PDBFile::getInjectedSourceStream() {
  461   Expected<uint32_t> ExpectedNSI = IS->getNamedStreamIndex("/names");
  474   Expected<uint32_t> ExpectedNSI = IS->getNamedStreamIndex("/src/headerblock");
  487 Expected<std::unique_ptr<MappedBlockStream>>
  495 Expected<std::unique_ptr<MappedBlockStream>>
  501   Expected<uint32_t> ExpectedNSI = IS->getNamedStreamIndex(Name);
lib/DebugInfo/PDB/Native/PDBFileBuilder.cpp
   85 Expected<uint32_t> PDBFileBuilder::allocateNamedStream(StringRef Name,
   94   Expected<uint32_t> ExpectedIndex = allocateNamedStream(Name, Data.size());
  137   Expected<uint32_t> SN = allocateNamedStream("/LinkInfo", 0);
  218 Expected<uint32_t> PDBFileBuilder::getNamedStreamIndex(StringRef Name) const {
  270   Expected<FileBufferByteStream> ExpectedMsfBuffer =
lib/DebugInfo/PDB/Native/PDBStringTable.cpp
  109 Expected<StringRef> PDBStringTable::getStringForID(uint32_t ID) const {
  113 Expected<uint32_t> PDBStringTable::getIDForString(StringRef Str) const {
lib/DebugInfo/PDB/Native/SymbolCache.cpp
  166     Expected<TypeIndex> EFD = Tpi->findFullDeclForForwardRef(Index);
lib/DebugInfo/PDB/Native/TpiHashing.cpp
   43 static Expected<uint32_t> getHashForUdt(const CVType &Rec) {
   52 static Expected<TagRecordHash> getTagRecordHashForUdt(const CVType &Rec) {
   78 static Expected<uint32_t> getSourceLineHash(const CVType &Rec) {
   88 Expected<TagRecordHash> llvm::pdb::hashTagRecord(const codeview::CVType &Type) {
  105 Expected<uint32_t> llvm::pdb::hashTypeRecord(const CVType &Rec) {
lib/DebugInfo/PDB/Native/TpiStream.cpp
  179 Expected<TypeIndex>
  188   Expected<TagRecordHash> ForwardTRH = hashTagRecord(F);
  199     Expected<TagRecordHash> FullTRH = hashTagRecord(CVT);
lib/DebugInfo/Symbolize/SymbolizableObjectFile.cpp
   57       Expected<StringRef> NameOrErr = Section->getName();
   62         Expected<StringRef> E = Section->getContents();
  166   Expected<section_iterator> Sec = Symbol.getSection();
  169   Expected<SymbolRef::Type> SymbolTypeOrErr = Symbol.getType();
  175   Expected<uint64_t> SymbolAddressOrErr = Symbol.getAddress();
  195   Expected<StringRef> SymbolNameOrErr = Symbol.getName();
lib/DebugInfo/Symbolize/Symbolize.cpp
   41 Expected<DILineInfo>
   61 Expected<DILineInfo>
   71   Expected<SymbolizableModule *> InfoOrErr =
   78 Expected<DILineInfo>
   81   Expected<SymbolizableModule *> InfoOrErr = getOrCreateModuleInfo(ModuleName);
   87 Expected<DIInliningInfo>
  117 Expected<DIGlobal>
  143 Expected<std::vector<DILocal>>
  249     if (Expected<StringRef> NameOrErr = Section.getName())
  256       Expected<StringRef> ContentsOrErr = Section.getContents();
  338 Expected<LLVMSymbolizer::ObjectPair>
  367 Expected<ObjectFile *>
  375     Expected<OwningBinary<Binary>> BinOrErr = createBinary(Path);
  390     Expected<std::unique_ptr<ObjectFile>> ObjOrErr =
  408 Expected<SymbolizableModule *>
  425 Expected<SymbolizableModule *>
lib/ExecutionEngine/JITLink/EHFrameSupport.cpp
   95 Expected<EHFrameBinaryParser::AugmentationInfo>
  136 Expected<JITTargetAddress> EHFrameBinaryParser::readAbsolutePointer() {
lib/ExecutionEngine/JITLink/EHFrameSupportImpl.h
   44   virtual Expected<Symbol &>
   55   Expected<AugmentationInfo> parseAugmentationString();
   56   Expected<JITTargetAddress> readAbsolutePointer();
lib/ExecutionEngine/JITLink/JITLinkGeneric.cpp
   88                                Expected<AsyncLookupResult> LR,
lib/ExecutionEngine/JITLink/JITLinkGeneric.h
   68                   Expected<AsyncLookupResult> LookupResult,
   77   virtual Expected<std::unique_ptr<LinkGraph>>
lib/ExecutionEngine/JITLink/JITLinkMemoryManager.cpp
   19 Expected<std::unique_ptr<JITLinkMemoryManager::Allocation>>
lib/ExecutionEngine/JITLink/MachOLinkGraphBuilder.cpp
   24 Expected<std::unique_ptr<LinkGraph>> MachOLinkGraphBuilder::buildGraph() {
lib/ExecutionEngine/JITLink/MachOLinkGraphBuilder.h
   30   Expected<std::unique_ptr<LinkGraph>> buildGraph();
   67     Expected<Symbol &> createFDERecord(JITTargetAddress RecordAddr,
  177   Expected<NormalizedSection &> findSectionByIndex(unsigned Index) {
  188   Expected<NormalizedSymbol &> findSymbolByIndex(uint64_t Index) {
  209   Expected<Symbol &> findSymbolByAddress(JITTargetAddress Address) {
lib/ExecutionEngine/JITLink/MachO_arm64.cpp
   45   static Expected<MachOARM64RelocationKind>
  121   Expected<PairRelocInfo>
  500   Expected<std::unique_ptr<LinkGraph>>
lib/ExecutionEngine/JITLink/MachO_x86_64.cpp
   44   static Expected<MachOX86RelocationKind>
  123   Expected<PairRelocInfo>
  460   Expected<std::unique_ptr<LinkGraph>>
lib/ExecutionEngine/MCJIT/MCJIT.cpp
  213   Expected<std::unique_ptr<object::ObjectFile>> LoadedObject =
  350       Expected<std::unique_ptr<object::Binary>> ChildBinOrErr =
lib/ExecutionEngine/Orc/Core.cpp
  682 Expected<SymbolAliasMap>
  711 Expected<SymbolNameSet>
 1349 Expected<SymbolFlagsMap> JITDylib::lookupFlags(const SymbolNameSet &Names) {
 1384 Expected<SymbolNameSet> JITDylib::lookupFlagsImpl(SymbolFlagsMap &Flags,
 1516 Expected<SymbolNameSet>
 1867 Expected<SymbolMap> ExecutionSession::legacyLookup(
 2025 Expected<SymbolMap>
 2079 Expected<JITEvaluatedSymbol>
 2093 Expected<JITEvaluatedSymbol>
 2106 Expected<JITEvaluatedSymbol>
lib/ExecutionEngine/Orc/ExecutionUtils.cpp
  182 Expected<std::unique_ptr<DynamicLibrarySearchGenerator>>
  193 Expected<SymbolNameSet>
  230 Expected<std::unique_ptr<StaticLibraryDefinitionGenerator>>
  240 Expected<std::unique_ptr<StaticLibraryDefinitionGenerator>>
  254 Expected<SymbolNameSet>
lib/ExecutionEngine/Orc/IndirectionUtils.cpp
   61 Expected<JITTargetAddress>
  115 Expected<std::unique_ptr<JITCompileCallbackManager>>
lib/ExecutionEngine/Orc/JITTargetMachineBuilder.cpp
   23 Expected<JITTargetMachineBuilder> JITTargetMachineBuilder::detectHost() {
   43 Expected<std::unique_ptr<TargetMachine>>
lib/ExecutionEngine/Orc/LLJIT.cpp
   57 Expected<JITEvaluatedSymbol> LLJIT::lookupLinkerMangled(JITDylib &JD,
   84 Expected<IRCompileLayer::CompileFunction>
lib/ExecutionEngine/Orc/Layer.cpp
  117 Expected<std::unique_ptr<BasicObjectLayerMaterializationUnit>>
  154 Expected<SymbolFlagsMap> getObjectSymbolFlags(ExecutionSession &ES,
lib/ExecutionEngine/Orc/LazyReexports.cpp
   26 Expected<JITTargetAddress> LazyCallThroughManager::getCallThroughTrampoline(
   83 Expected<std::unique_ptr<LazyCallThroughManager>>
lib/ExecutionEngine/Orc/Legacy.cpp
   50 Expected<JITSymbolResolverAdapter::LookupSet>
lib/ExecutionEngine/Orc/OrcCBindingsStack.h
  265   Expected<JITTargetAddress>
  285   Expected<orc::VModuleKey>
  325   Expected<orc::VModuleKey>
  334   Expected<orc::VModuleKey>
  357   Expected<orc::VModuleKey> addObject(std::unique_ptr<MemoryBuffer> ObjBuffer,
  392   Expected<JITTargetAddress> findSymbolAddress(const std::string &Name,
  409   Expected<JITTargetAddress> findSymbolAddressIn(orc::VModuleKey K,
lib/ExecutionEngine/Orc/OrcMCJITReplacement.h
  401         Expected<std::unique_ptr<object::Binary>> ChildBinOrErr =
lib/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.cpp
   56   Expected<LookupSet> getResponsibilitySet(const LookupSet &Symbols) {
lib/ExecutionEngine/RuntimeDyld/JITSymbol.cpp
   39 Expected<JITSymbolFlags>
  110 Expected<JITSymbolResolver::LookupSet>
lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
  172   Expected<uint64_t> AddressOrErr = Sym.getAddress();
  179 Expected<RuntimeDyldImpl::ObjSectionToIDMap>
  352     Expected<section_iterator> RelSecOrErr = SI->getRelocatedSection();
  543       Expected<StringRef> NameOrErr = Section.getName();
  656     Expected<section_iterator> RelSecOrErr = SI->getRelocatedSection();
  712 Expected<JITSymbolFlags>
  771 Expected<unsigned>
  792   Expected<StringRef> NameOrErr = Section.getName();
  815     if (Expected<StringRef> E = Section.getContents())
  889 Expected<unsigned>
 1160       using ExpectedLookupResult = Expected<JITSymbolResolver::LookupResult>;
lib/ExecutionEngine/RuntimeDyld/RuntimeDyldCheckerImpl.h
   42   Expected<JITSymbolResolver::LookupResult>
lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
   72   static Expected<std::unique_ptr<DyldELFObject>>
  101 Expected<std::unique_ptr<DyldELFObject<ELFT>>>
  147 static Expected<std::unique_ptr<DyldELFObject<ELFT>>>
  153   Expected<std::unique_ptr<DyldELFObject<ELFT>>> ObjOrErr =
  163     Expected<StringRef> NameOrErr = Sec.getName();
  193   Expected<std::unique_ptr<ObjectFile>> DebugObj(nullptr);
  575     Expected<StringRef> NameOrErr = Section.getName();
  610     Expected<section_iterator> RelSecOrErr = si->getRelocatedSection();
  618     Expected<StringRef> NameOrErr = RelSecI->getName();
 1108 Expected<relocation_iterator>
 1115   if (Expected<int64_t> AddendOrErr = ELFRelocationRef(*RelI).getAddend())
 1139     Expected<SymbolRef::Type> SymTypeOrErr = Symbol->getType();
 1879           Expected<section_iterator> RelSecOrErr = SI->getRelocatedSection();
 1900     Expected<StringRef> NameOrErr = Section.getName();
lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h
  176   Expected<relocation_iterator>
lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h
  364   virtual Expected<JITSymbolFlags> getJITSymbolFlags(const SymbolRef &Sym);
  386   Expected<unsigned> emitSection(const ObjectFile &Obj,
  395   Expected<unsigned> findOrEmitSection(const ObjectFile &Obj,
  422   virtual Expected<relocation_iterator>
  448   Expected<ObjSectionToIDMap> loadObjectImpl(const object::ObjectFile &Obj);
lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp
   53 Expected<relocation_iterator>
   96 Expected<RelocationValueRef>
  236     if (Expected<StringRef> NameOrErr = Section.getName())
lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h
   82   Expected<relocation_iterator>
   97   Expected<RelocationValueRef>
lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFI386.h
   36   Expected<object::relocation_iterator>
   47     Expected<StringRef> TargetNameOrErr = Symbol->getName();
lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFThumb.h
   27   Expected<object::SymbolRef::Type> SymTypeOrErr = Symbol->getType();
   59   Expected<object::relocation_iterator>
   69     Expected<StringRef> TargetNameOrErr = Symbol->getName();
lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFX86_64.h
  189   Expected<object::relocation_iterator>
  214     Expected<StringRef> TargetNameOrErr = Symbol->getName();
  287       Expected<StringRef> NameOrErr = Section.getName();
lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOAArch64.h
   34   Expected<int64_t> decodeAddend(const RelocationEntry &RE) const {
  272   Expected<relocation_iterator>
  479   Expected<relocation_iterator>
  493     Expected<StringRef> SubtrahendNameOrErr = RelI->getSymbol()->getName();
  503     Expected<StringRef> MinuendNameOrErr = RelI->getSymbol()->getName();
lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOARM.h
   36   Expected<JITSymbolFlags> getJITSymbolFlags(const SymbolRef &SR) override {
   63   Expected<int64_t> decodeAddend(const RelocationEntry &RE) const {
  100   Expected<relocation_iterator>
  292     if (Expected<StringRef> NameOrErr = Section.getName())
  344   Expected<relocation_iterator>
lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOI386.h
   33   Expected<relocation_iterator>
  131     if (Expected<StringRef> NameOrErr = Section.getName())
  145   Expected<relocation_iterator>
  232       Expected<StringRef> IndirectSymbolName = SI->getName();
lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOX86_64.h
   33   Expected<relocation_iterator>
  157   Expected<relocation_iterator>
  182       Expected<StringRef> SubtrahendNameOrErr = RelI->getSymbol()->getName();
  191       Expected<unsigned> SectionBIDOrErr =
  208       Expected<StringRef> MinuendNameOrErr = RelI->getSymbol()->getName();
  217       Expected<unsigned> SectionAIDOrErr =
lib/IR/RemarkStreamer.cpp
  143 Expected<std::unique_ptr<ToolOutputFile>>
  157   Expected<remarks::Format> Format = remarks::parseFormat(RemarksFormat);
  171   Expected<std::unique_ptr<remarks::RemarkSerializer>> RemarkSerializer =
  198   Expected<remarks::Format> Format = remarks::parseFormat(RemarksFormat);
  202   Expected<std::unique_ptr<remarks::RemarkSerializer>> RemarkSerializer =
lib/IRReader/IRReader.cpp
   37     Expected<std::unique_ptr<Module>> ModuleOrErr = getOwningLazyBitcodeModule(
   77     Expected<std::unique_ptr<Module>> ModuleOrErr =
lib/LTO/Caching.cpp
   30 Expected<NativeObjectCache> lto::localCache(StringRef CacheDirectoryPath,
   42     Expected<sys::fs::file_t> FDOrErr = sys::fs::openNativeFileForRead(
  137       Expected<sys::fs::TempFile> Temp = sys::fs::TempFile::create(
lib/LTO/LTO.cpp
  429 Expected<std::unique_ptr<InputFile>> InputFile::create(MemoryBufferRef Object) {
  432   Expected<IRSymtabFile> FOrErr = readIRSymtab(Object);
  590   Expected<BitcodeLTOInfo> LTOInfo = Input.Mods[ModI].getLTOInfo();
  612   Expected<RegularLTOState::AddedModule> ModOrErr =
  661 Expected<LTO::RegularLTOState::AddedModule>
  666   Expected<std::unique_ptr<Module>> MOrErr =
 1088       Expected<std::unique_ptr<Module>> MOrErr = BM.parseModule(BackendContext);
 1378 Expected<std::unique_ptr<ToolOutputFile>>
 1397 Expected<std::unique_ptr<ToolOutputFile>>
lib/LTO/LTOBackend.cpp
  377               Expected<std::unique_ptr<Module>> MOrErr = parseBitcodeFile(
  401 Expected<const Target *> initAndLookupTarget(Config &C, Module &Mod) {
  431   Expected<const Target *> TOrErr = initAndLookupTarget(C, *Mod);
  486   Expected<const Target *> TOrErr = initAndLookupTarget(Conf, Mod);
lib/LTO/LTOModule.cpp
   56   Expected<MemoryBufferRef> BCData = IRObjectFile::findBitcodeInMemBuffer(
   67   Expected<MemoryBufferRef> BCData = IRObjectFile::findBitcodeInMemBuffer(
   73   Expected<BitcodeLTOInfo> Result = getBitcodeLTOInfo(MBRef);
   83   Expected<MemoryBufferRef> BCOrErr =
   96   Expected<MemoryBufferRef> BCOrErr =
  172   Expected<MemoryBufferRef> MBOrErr =
  658   Expected<std::unique_ptr<lto::InputFile>> ObjOrErr =
lib/LTO/ThinLTOCodeGenerator.cpp
  187   Expected<std::unique_ptr<Module>> ModuleOrErr =
  215   Expected<bool> Result = Importer.importFunctions(TheModule, ImportList);
  357     Expected<sys::fs::file_t> FDOrErr = sys::fs::openNativeFileForRead(
lib/Linker/IRMover.cpp
  474   Expected<Constant *> linkAppendingVarProto(GlobalVariable *DstGV,
  483   Expected<Constant *> linkGlobalValueProto(GlobalValue *GV,
  578   Expected<Constant *> NewProto = linkGlobalValueProto(SGV, ForIndirectSymbol);
  839 Expected<Constant *>
  962 Expected<Constant *> IRLinker::linkGlobalValueProto(GlobalValue *SGV,
lib/MC/MCAsmStreamer.cpp
  228   Expected<unsigned> tryEmitDwarfFileDirective(unsigned FileNo,
 1241 Expected<unsigned> MCAsmStreamer::tryEmitDwarfFileDirective(
 1248   Expected<unsigned> FileNoOrErr =
lib/MC/MCContext.cpp
  647 Expected<unsigned> MCContext::getDwarfFile(StringRef Directory,
lib/MC/MCDwarf.cpp
  537 Expected<unsigned> MCDwarfLineTable::tryGetFile(StringRef &Directory,
  554 Expected<unsigned>
lib/MC/MCParser/AsmParser.cpp
 3458       Expected<unsigned> FileNumOrErr = getStreamer().tryEmitDwarfFileDirective(
lib/MC/MCStreamer.cpp
  212 Expected<unsigned>
lib/MCA/InstrBuilder.cpp
  508 Expected<const InstrDesc &>
  598 Expected<const InstrDesc &>
  609 Expected<std::unique_ptr<Instruction>>
  611   Expected<const InstrDesc &> DescOrErr = getOrCreateInstrDesc(MCI);
lib/MCA/Pipeline.cpp
   37 Expected<unsigned> Pipeline::run() {
lib/Object/Archive.cpp
   66       Expected<StringRef> NameOrErr = getName(Size);
   86       Expected<StringRef> NameOrErr = getName(Size);
  100 Expected<StringRef> ArchiveMemberHeader::getRawName() const {
  128 Expected<StringRef> ArchiveMemberHeader::getName(uint64_t Size) const {
  142   Expected<StringRef> NameOrErr = getRawName();
  226 Expected<uint64_t> ArchiveMemberHeader::getSize() const {
  244 Expected<sys::fs::perms> ArchiveMemberHeader::getAccessMode() const {
  262 Expected<sys::TimePoint<std::chrono::seconds>>
  283 Expected<unsigned> ArchiveMemberHeader::getUID() const {
  302 Expected<unsigned> ArchiveMemberHeader::getGID() const {
  351   Expected<bool> isThinOrErr = isThinMember();
  358     Expected<uint64_t> MemberSize = getRawSize();
  370   Expected<StringRef> NameOrErr = getRawName();
  394 Expected<uint64_t> Archive::Child::getSize() const {
  396     Expected<uint32_t> Size = Header.getSize();
  404 Expected<uint64_t> Archive::Child::getRawSize() const {
  408 Expected<bool> Archive::Child::isThinMember() const {
  409   Expected<StringRef> NameOrErr = Header.getRawName();
  416 Expected<std::string> Archive::Child::getFullName() const {
  417   Expected<bool> isThin = isThinMember();
  421   Expected<StringRef> NameOrErr = getName();
  434 Expected<StringRef> Archive::Child::getBuffer() const {
  435   Expected<bool> isThinOrErr = isThinMember();
  440     Expected<uint32_t> Size = getSize();
  445   Expected<std::string> FullNameOrErr = getFullName();
  456 Expected<Archive::Child> Archive::Child::getNext() const {
  472     Expected<StringRef> NameOrErr = getName();
  495 Expected<StringRef> Archive::Child::getName() const {
  496   Expected<uint64_t> RawSizeOrErr = getRawSize();
  500   Expected<StringRef> NameOrErr = Header.getName(Header.getSizeOf() + RawSize);
  507 Expected<MemoryBufferRef> Archive::Child::getMemoryBufferRef() const {
  508   Expected<StringRef> NameOrErr = getName();
  512   Expected<StringRef> Buf = getBuffer();
  518 Expected<std::unique_ptr<Binary>>
  520   Expected<MemoryBufferRef> BuffOrErr = getMemoryBufferRef();
  530 Expected<std::unique_ptr<Archive>> Archive::create(MemoryBufferRef Source) {
  586   Expected<StringRef> NameOrErr = C->getRawName();
  619     Expected<StringRef> BufOrErr = C->getBuffer();
  636     Expected<StringRef> NameOrErr = C->getName();
  645       Expected<StringRef> BufOrErr = C->getBuffer();
  658       Expected<StringRef> BufOrErr = C->getBuffer();
  680     Expected<StringRef> BufOrErr = C->getBuffer();
  695     Expected<StringRef> NameOrErr = C->getRawName();
  707     Expected<StringRef> BufOrErr = C->getBuffer();
  735   Expected<StringRef> BufOrErr = C->getBuffer();
  761     Expected<StringRef> BufOrErr = C->getBuffer();
  799 Expected<Archive::Child> Archive::Symbol::getMember() const {
  976 Expected<Optional<Archive::Child>> Archive::findSym(StringRef name) const {
lib/Object/ArchiveWriter.cpp
   45 Expected<NewArchiveMember>
   48   Expected<llvm::MemoryBufferRef> BufOrErr = OldMember.getMemoryBufferRef();
   60     Expected<unsigned> UIDOrErr = OldMember.getUID();
   64     Expected<unsigned> GIDOrErr = OldMember.getGID();
   68     Expected<sys::fs::perms> AccessModeOrErr = OldMember.getAccessMode();
   76 Expected<NewArchiveMember> NewArchiveMember::getFile(StringRef FileName,
  349 static Expected<std::vector<unsigned>>
  388 static Expected<std::vector<MemberData>>
  492     Expected<std::vector<unsigned>> Symbols =
  520 Expected<std::string> computeArchiveRelativePath(StringRef From, StringRef To) {
  562   Expected<std::vector<MemberData>> DataOrErr = computeMemberData(
  607   Expected<sys::fs::TempFile> Temp =
lib/Object/Binary.cpp
   46 Expected<std::unique_ptr<Binary>> object::createBinary(MemoryBufferRef Buffer,
   96 Expected<OwningBinary<Binary>> object::createBinary(StringRef Path) {
  104   Expected<std::unique_ptr<Binary>> BinOrErr =
lib/Object/COFFImportFile.cpp
  109 static Expected<std::string> replace(StringRef S, StringRef From,
  602     Expected<std::string> Name = E.ExtName.empty()
lib/Object/COFFModuleDefinition.cpp
  151   Expected<COFFModuleDefinition> parse() {
  361 Expected<COFFModuleDefinition> parseCOFFModuleDefinition(MemoryBufferRef MB,
lib/Object/COFFObjectFile.cpp
  149 Expected<StringRef> COFFObjectFile::getSymbolName(DataRefImpl Ref) const {
  168 Expected<uint64_t> COFFObjectFile::getSymbolAddress(DataRefImpl Ref) const {
  189 Expected<SymbolRef::Type> COFFObjectFile::getSymbolType(DataRefImpl Ref) const {
  248 Expected<section_iterator>
  272 Expected<StringRef> COFFObjectFile::getSectionName(DataRefImpl Ref) const {
  295 Expected<ArrayRef<uint8_t>>
  913 Expected<uint64_t> COFFObjectFile::getStartAddress() const {
 1054 Expected<StringRef>
 1622 Expected<std::unique_ptr<COFFObjectFile>>
 1672 Expected<ArrayRef<UTF16>>
 1683 Expected<ArrayRef<UTF16>>
 1688 Expected<const coff_resource_dir_table &>
 1699 Expected<const coff_resource_dir_entry &>
 1710 Expected<const coff_resource_data_entry &>
 1721 Expected<const coff_resource_dir_table &>
 1727 Expected<const coff_resource_data_entry &>
 1733 Expected<const coff_resource_dir_table &> ResourceSectionRef::getBaseTable() {
 1737 Expected<const coff_resource_dir_entry &>
 1750     Expected<StringRef> Name = S.getName();
 1764   Expected<StringRef> Contents = Section.getContents();
 1780 Expected<StringRef>
 1823     Expected<COFFSymbolRef> Sym = Obj->getSymbol(R.SymbolTableIndex);
 1854         Expected<StringRef> Contents = S.getContents();
lib/Object/Decompressor.cpp
   20 Expected<Decompressor> Decompressor::create(StringRef Name, StringRef Data,
   83   Expected<StringRef> SecNameOrErr = Section.getName();
lib/Object/ELF.cpp
  271 Expected<std::vector<typename ELFT::Rela>>
  350 Expected<std::vector<typename ELFT::Rela>>
  354   Expected<ArrayRef<uint8_t>> ContentsOrErr = getSectionContents(Sec);
  500 Expected<typename ELFT::DynRange> ELFFile<ELFT>::dynamicEntries() const {
  527         Expected<ArrayRef<Elf_Dyn>> DynOrError =
  557 Expected<const uint8_t *> ELFFile<ELFT>::toMappedAddr(uint64_t VAddr) const {
lib/Object/ELFObjectFile.cpp
   61 static Expected<std::unique_ptr<ELFObjectFile<ELFT>>>
   69 Expected<std::unique_ptr<ObjectFile>>
  410     Expected<StringRef> NameOrErr = Section.getName();
  426   Expected<StringRef> PltContents = Plt->getContents();
lib/Object/IRObjectFile.cpp
   73 Expected<MemoryBufferRef>
   77       Expected<StringRef> Contents = Sec.getContents();
   89 Expected<MemoryBufferRef>
   98     Expected<std::unique_ptr<ObjectFile>> ObjFile =
  109 Expected<std::unique_ptr<IRObjectFile>>
  111   Expected<MemoryBufferRef> BCOrErr = findBitcodeInMemBuffer(Object);
  115   Expected<std::vector<BitcodeModule>> BMsOrErr =
  122     Expected<std::unique_ptr<Module>> MOrErr =
  135 Expected<IRSymtabFile> object::readIRSymtab(MemoryBufferRef MBRef) {
  137   Expected<MemoryBufferRef> BCOrErr =
  142   Expected<BitcodeFileContents> BFCOrErr = getBitcodeFileContents(*BCOrErr);
  146   Expected<irsymtab::FileContents> FCOrErr = irsymtab::readBitcode(*BFCOrErr);
lib/Object/IRSymtab.cpp
  107   Expected<int> getComdatIndex(const Comdat *C, const Module *M);
  166 Expected<int> Builder::getComdatIndex(const Comdat *C, const Module *M) {
  277     Expected<int> ComdatIndexOrErr = getComdatIndex(C, GV->getParent());
  346 static Expected<FileContents> upgrade(ArrayRef<BitcodeModule> BMs) {
  353     Expected<std::unique_ptr<Module>> MOrErr =
  377 Expected<FileContents> irsymtab::readBitcode(const BitcodeFileContents &BFC) {
lib/Object/MachOObjectFile.cpp
   81 static Expected<T> getStructOrErr(const MachOObjectFile &O, const char *P) {
  182 static Expected<MachOObjectFile::LoadCommandInfo>
  197 static Expected<MachOObjectFile::LoadCommandInfo>
  207 static Expected<MachOObjectFile::LoadCommandInfo>
 1240 Expected<std::unique_ptr<MachOObjectFile>>
 1748 Expected<StringRef> MachOObjectFile::getSymbolName(DataRefImpl Symb) const {
 1798 Expected<uint64_t> MachOObjectFile::getSymbolAddress(DataRefImpl Sym) const {
 1815 Expected<SymbolRef::Type>
 1828       Expected<section_iterator> SecOrError = getSymbolSection(Symb);
 1878 Expected<section_iterator>
 1904 Expected<StringRef> MachOObjectFile::getSectionName(DataRefImpl Sec) const {
 1953 Expected<ArrayRef<uint8_t>>
 1984 Expected<SectionRef> MachOObjectFile::getSection(unsigned SectionIndex) const {
 1993 Expected<SectionRef> MachOObjectFile::getSection(StringRef SectionName) const {
 2042   if (Expected<StringRef> NameOrErr = getSectionName(Sec))
 4002     Expected<StringRef> NameOrErr = Section.getName();
 4635 Expected<std::unique_ptr<MachOObjectFile>>
lib/Object/MachOUniversal.cpp
   62 Expected<std::unique_ptr<MachOObjectFile>>
   83 Expected<std::unique_ptr<Archive>>
  102 Expected<std::unique_ptr<MachOUniversalBinary>>
  213 Expected<MachOUniversalBinary::ObjectForArch>
  229 Expected<std::unique_ptr<MachOObjectFile>>
  231   Expected<ObjectForArch> O = getObjectForArch(ArchName);
  237 Expected<std::unique_ptr<Archive>>
  239   Expected<ObjectForArch> O = getObjectForArch(ArchName);
lib/Object/Minidump.cpp
   25 Expected<std::string> MinidumpFile::getString(size_t Offset) const {
   56 Expected<iterator_range<MinidumpFile::MemoryInfoIterator>>
   66   Expected<ArrayRef<uint8_t>> Data =
   75 Expected<ArrayRef<T>> MinidumpFile::getListStream(StreamType Type) const {
  101 Expected<ArrayRef<uint8_t>>
  110 Expected<std::unique_ptr<MinidumpFile>>
  133     Expected<ArrayRef<uint8_t>> Stream =
lib/Object/Object.cpp
   68   Expected<std::unique_ptr<Binary>> ObjOrErr(
  140   Expected<std::unique_ptr<ObjectFile>> ObjOrErr(
  180   Expected<std::unique_ptr<ObjectFile>> ObjOrErr(
  220   Expected<section_iterator> SecOrErr = (*unwrap(Sym))->getSection();
  265   if (Expected<StringRef> E = (*unwrap(SI))->getContents())
  302   Expected<StringRef> Ret = (*unwrap(SI))->getName();
  314   Expected<uint64_t> Ret = (*unwrap(SI))->getAddress();
lib/Object/ObjectFile.cpp
   41   Expected<section_iterator> SymSec = S.getSection();
   60   Expected<StringRef> Name = getSymbolName(Symb);
   70   Expected<StringRef> NameOrErr = getSectionName(Sec);
   87 Expected<section_iterator>
  117 Expected<std::unique_ptr<ObjectFile>>
  167 Expected<OwningBinary<ObjectFile>>
  175   Expected<std::unique_ptr<ObjectFile>> ObjOrErr =
lib/Object/RelocationResolver.cpp
   19   Expected<int64_t> AddendOrErr = ELFRelocationRef(R).getAddend();
lib/Object/SymbolicFile.cpp
   37 Expected<std::unique_ptr<SymbolicFile>>
   82     Expected<std::unique_ptr<ObjectFile>> Obj =
   87     Expected<MemoryBufferRef> BCData =
lib/Object/TapiUniversal.cpp
   40 Expected<std::unique_ptr<TapiFile>>
   47 Expected<std::unique_ptr<TapiUniversal>>
lib/Object/WasmObjectFile.cpp
   56 Expected<std::unique_ptr<WasmObjectFile>>
 1290 Expected<StringRef> WasmObjectFile::getSymbolName(DataRefImpl Symb) const {
 1294 Expected<uint64_t> WasmObjectFile::getSymbolAddress(DataRefImpl Symb) const {
 1337 Expected<SymbolRef::Type>
 1358 Expected<section_iterator>
 1389 Expected<StringRef> WasmObjectFile::getSectionName(DataRefImpl Sec) const {
 1427 Expected<ArrayRef<uint8_t>>
lib/Object/WindowsResource.cpp
   59 Expected<std::unique_ptr<WindowsResource>>
   69 Expected<ResourceEntryRef> WindowsResource::getHeadEntry() {
   80 Expected<ResourceEntryRef>
 1001 Expected<std::unique_ptr<MemoryBuffer>>
lib/Object/XCOFFObjectFile.cpp
   25 static Expected<const T *> getObject(MemoryBufferRef M, const void *Ptr,
  139 Expected<StringRef>
  156 Expected<StringRef>
  164 Expected<StringRef> XCOFFObjectFile::getSymbolName(DataRefImpl Symb) const {
  178 Expected<uint64_t> XCOFFObjectFile::getSymbolAddress(DataRefImpl Symb) const {
  195 Expected<SymbolRef::Type>
  201 Expected<section_iterator>
  209   Expected<DataRefImpl> ExpSec = getSectionByNum(SectNum);
  221 Expected<StringRef> XCOFFObjectFile::getSectionName(DataRefImpl Sec) const {
  252 Expected<ArrayRef<uint8_t>>
  382 Expected<uint64_t> XCOFFObjectFile::getStartAddress() const {
  405 Expected<DataRefImpl> XCOFFObjectFile::getSectionByNum(int16_t Num) const {
  415 Expected<StringRef>
  428     Expected<DataRefImpl> SecRef = getSectionByNum(SectionNum);
  508 Expected<StringRef>
  560 Expected<uint32_t> XCOFFObjectFile::getLogicalNumberOfRelocationEntries(
  575 Expected<ArrayRef<XCOFFRelocation32>>
  596 Expected<XCOFFStringTable>
  624 Expected<std::unique_ptr<XCOFFObjectFile>>
  676   Expected<XCOFFStringTable> StringTableOrErr =
  685 Expected<std::unique_ptr<ObjectFile>>
  758   Expected<DataRefImpl> SI = OwningObjectPtr->getSectionByNum(SectNum);
lib/ObjectYAML/CodeViewYAMLDebugSections.cpp
  113   static Expected<std::shared_ptr<YAMLChecksumsSubsection>>
  127   static Expected<std::shared_ptr<YAMLLinesSubsection>>
  143   static Expected<std::shared_ptr<YAMLInlineeLinesSubsection>>
  159   static Expected<std::shared_ptr<YAMLCrossModuleExportsSubsection>>
  173   static Expected<std::shared_ptr<YAMLCrossModuleImportsSubsection>>
  187   static Expected<std::shared_ptr<YAMLSymbolsSubsection>>
  201   static Expected<std::shared_ptr<YAMLStringTableSubsection>>
  215   static Expected<std::shared_ptr<YAMLFrameDataSubsection>>
  230   static Expected<std::shared_ptr<YAMLCoffSymbolRVASubsection>>
  540 static Expected<SourceFileChecksumEntry>
  554 static Expected<StringRef>
  564 Expected<std::shared_ptr<YAMLChecksumsSubsection>>
  579 Expected<std::shared_ptr<YAMLLinesSubsection>>
  617 Expected<std::shared_ptr<YAMLInlineeLinesSubsection>>
  646 Expected<std::shared_ptr<YAMLCrossModuleExportsSubsection>>
  654 Expected<std::shared_ptr<YAMLCrossModuleImportsSubsection>>
  671 Expected<std::shared_ptr<YAMLSymbolsSubsection>>
  689 Expected<std::shared_ptr<YAMLStringTableSubsection>>
  707 Expected<std::shared_ptr<YAMLFrameDataSubsection>>
  736 Expected<std::shared_ptr<YAMLCoffSymbolRVASubsection>>
  746 Expected<std::vector<std::shared_ptr<DebugSubsection>>>
  890 Expected<YAMLDebugSubsection>
lib/ObjectYAML/CodeViewYAMLSymbols.cpp
  582 static inline Expected<CodeViewYAML::SymbolRecord>
  593 Expected<CodeViewYAML::SymbolRecord>
lib/ObjectYAML/CodeViewYAMLTypes.cpp
  669 static inline Expected<LeafRecord> fromCodeViewRecordImpl(CVType Type) {
  679 Expected<LeafRecord> LeafRecord::fromCodeViewRecord(CVType Type) {
lib/ObjectYAML/DWARFEmitter.cpp
  350 Expected<StringMap<std::unique_ptr<MemoryBuffer>>>
lib/ObjectYAML/MinidumpYAML.cpp
  461 Expected<std::unique_ptr<Stream>>
  466     Expected<const minidump::ExceptionStream &> ExpectedExceptionStream =
  470     Expected<ArrayRef<uint8_t>> ExpectedThreadContext =
  552 Expected<Object> Object::create(const object::MinidumpFile &File) {
lib/ObjectYAML/yaml2obj.cpp
   66   Expected<std::unique_ptr<object::ObjectFile>> ObjOrErr =
lib/Passes/PassBuilder.cpp
 1445   Expected<ParametersT> Result = Parser(Params);
 1452 Expected<LoopUnrollOptions> parseLoopUnrollOptions(StringRef Params) {
 1497 Expected<MemorySanitizerOptions> parseMSanPassOptions(StringRef Params) {
 1526 Expected<SimplifyCFGOptions> parseSimplifyCFGOptions(StringRef Params) {
 1560 Expected<LoopVectorizeOptions> parseLoopVectorizeOptions(StringRef Params) {
 1580 Expected<bool> parseLoopUnswitchOptions(StringRef Params) {
 1599 Expected<bool> parseMergedLoadStoreMotionOptions(StringRef Params) {
lib/Passes/PassPlugin.cpp
   16 Expected<PassPlugin> PassPlugin::Load(const std::string &Filename) {
lib/ProfileData/Coverage/CoverageMapping.cpp
  157   Expected<int64_t> Value = evaluate(C);
  165 Expected<int64_t> CounterMappingContext::evaluate(const Counter &C) const {
  177     Expected<int64_t> LHS = evaluate(E.LHS);
  180     Expected<int64_t> RHS = evaluate(E.RHS);
  246     Expected<int64_t> ExecutionCount = Ctx.evaluate(Region.Count);
  278 Expected<std::unique_ptr<CoverageMapping>> CoverageMapping::load(
  306 Expected<std::unique_ptr<CoverageMapping>>
lib/ProfileData/Coverage/CoverageMappingReader.cpp
  320 Expected<bool> RawCoverageMappingDummyChecker::isDummy() {
  351   Expected<StringRef> DataOrErr = Section.getContents();
  376 static Expected<bool> isCoverageMappingDummy(uint64_t Hash, StringRef Mapping) {
  395   virtual Expected<const char *> readFunctionRecords(const char *Buf,
  399   static Expected<std::unique_ptr<CovMapFuncRecordReader>>
  445     Expected<bool> OldIsDummyExpected = isCoverageMappingDummy(
  451     Expected<bool> NewIsDummyExpected =
  473   Expected<const char *> readFunctionRecords(const char *Buf,
  534 Expected<std::unique_ptr<CovMapFuncRecordReader>> CovMapFuncRecordReader::get(
  572   Expected<std::unique_ptr<CovMapFuncRecordReader>> ReaderExpected =
  589 Expected<std::unique_ptr<BinaryCoverageReader>>
  622 static Expected<std::unique_ptr<BinaryCoverageReader>>
  659 static Expected<SectionRef> lookupSection(ObjectFile &OF, StringRef Name) {
  670     Expected<StringRef> NameOrErr = Section.getName();
  679 static Expected<std::unique_ptr<BinaryCoverageReader>>
  732 Expected<std::vector<std::unique_ptr<BinaryCoverageReader>>>
  777       Expected<MemoryBufferRef> ChildBufOrErr = Child.getMemoryBufferRef();
lib/ProfileData/InstrProf.cpp
  873 Expected<std::unique_ptr<ValueProfData>>
lib/ProfileData/InstrProfReader.cpp
   40 static Expected<std::unique_ptr<MemoryBuffer>>
   53 Expected<std::unique_ptr<InstrProfReader>>
   62 Expected<std::unique_ptr<InstrProfReader>>
   91 Expected<std::unique_ptr<IndexedInstrProfReader>>
  112 Expected<std::unique_ptr<IndexedInstrProfReader>>
  454   Expected<std::unique_ptr<ValueProfData>> VDataPtrOrErr =
  515   Expected<std::unique_ptr<ValueProfData>> VDataPtrOrErr =
  867 Expected<InstrProfRecord>
  887   Expected<InstrProfRecord> Record = getInstrProfRecord(FuncName, FuncHash);
lib/Remarks/BitstreamRemarkParser.cpp
   48   Expected<unsigned> RecordID = Stream.readRecord(Code, Record, &Blob);
   95   Expected<unsigned> RecordID = Stream.readRecord(Code, Record, &Blob);
  161   Expected<BitstreamEntry> Next = Stream.advance();
  177     Expected<BitstreamEntry> Next = Stream.advance();
  212 Expected<std::array<char, 4>> BitstreamParserHelper::parseMagic() {
  215     if (Expected<unsigned> R = Stream.Read(8))
  223   Expected<BitstreamEntry> Next = Stream.advance();
  233   Expected<Optional<BitstreamBlockInfo>> MaybeBlockInfo =
  249 static Expected<bool> isBlock(BitstreamCursor &Stream, unsigned BlockID) {
  252   Expected<BitstreamEntry> Next = Stream.advance();
  273 Expected<bool> BitstreamParserHelper::isMetaBlock() {
  277 Expected<bool> BitstreamParserHelper::isRemarkBlock() {
  290   Expected<std::array<char, 4>> Magic = Helper.parseMagic();
  297   Expected<bool> isMetaBlock = Helper.isMetaBlock();
  307 Expected<std::unique_ptr<BitstreamRemarkParser>>
  312   Expected<std::array<char, 4>> Magic = Helper.parseMagic();
  329 Expected<std::unique_ptr<Remark>> BitstreamRemarkParser::next() {
  484 Expected<std::unique_ptr<Remark>> BitstreamRemarkParser::parseRemark() {
  492 Expected<std::unique_ptr<Remark>>
  520   if (Expected<StringRef> RemarkName = (*StrTab)[*Helper.RemarkNameIdx])
  530   if (Expected<StringRef> PassName = (*StrTab)[*Helper.PassNameIdx])
  539   if (Expected<StringRef> FunctionName = (*StrTab)[*Helper.FunctionNameIdx])
  545     Expected<StringRef> SourceFileName = (*StrTab)[*Helper.SourceFileNameIdx];
  574     if (Expected<StringRef> Key = (*StrTab)[*Arg.KeyIdx])
  579     if (Expected<StringRef> Value = (*StrTab)[*Arg.ValueIdx])
  585       if (Expected<StringRef> SourceFileName =
lib/Remarks/BitstreamRemarkParser.h
   53   Expected<std::unique_ptr<Remark>> next() override;
   63   Expected<std::unique_ptr<Remark>> parseRemark();
   71   Expected<std::unique_ptr<Remark>>
   76 Expected<std::unique_ptr<BitstreamRemarkParser>> createBitstreamParserFromMeta(
lib/Remarks/RemarkFormat.cpp
   19 Expected<Format> llvm::remarks::parseFormat(StringRef FormatStr) {
lib/Remarks/RemarkParser.cpp
   36 Expected<StringRef> ParsedStringTable::operator[](size_t Index) const {
   51 Expected<std::unique_ptr<RemarkParser>>
   69 Expected<std::unique_ptr<RemarkParser>>
   88 Expected<std::unique_ptr<RemarkParser>>
  147   Expected<std::unique_ptr<Remark>> MaybeRemark = TheParser.next();
lib/Remarks/RemarkSerializer.cpp
   20 Expected<std::unique_ptr<RemarkSerializer>>
   37 Expected<std::unique_ptr<RemarkSerializer>>
lib/Remarks/RemarkStringTable.cpp
   25     if (Expected<StringRef> MaybeStr = Other[i])
lib/Remarks/YAMLRemarkParser.cpp
   61 static Expected<bool> parseMagic(StringRef &Buf) {
   71 static Expected<uint64_t> parseVersion(StringRef &Buf) {
   88 static Expected<uint64_t> parseStrTabSize(StringRef &Buf) {
   99 static Expected<ParsedStringTable> parseStrTab(StringRef &Buf,
  111 Expected<std::unique_ptr<YAMLRemarkParser>>
  116   Expected<bool> isMeta = parseMagic(Buf);
  122     Expected<uint64_t> Version = parseVersion(Buf);
  126     Expected<uint64_t> StrTabSize = parseStrTabSize(Buf);
  135       Expected<ParsedStringTable> MaybeStrTab = parseStrTab(Buf, *StrTabSize);
  190 Expected<std::unique_ptr<Remark>>
  210   Expected<Type> T = parseType(*Root);
  218     Expected<StringRef> MaybeKey = parseKey(RemarkField);
  224       if (Expected<StringRef> MaybeStr = parseStr(RemarkField))
  229       if (Expected<StringRef> MaybeStr = parseStr(RemarkField))
  234       if (Expected<StringRef> MaybeStr = parseStr(RemarkField))
  239       if (Expected<unsigned> MaybeU = parseUnsigned(RemarkField))
  244       if (Expected<RemarkLocation> MaybeLoc = parseDebugLoc(RemarkField))
  254         if (Expected<Argument> MaybeArg = parseArg(Arg))
  273 Expected<Type> YAMLRemarkParser::parseType(yaml::MappingNode &Node) {
  287 Expected<StringRef> YAMLRemarkParser::parseKey(yaml::KeyValueNode &Node) {
  294 Expected<StringRef> YAMLRemarkParser::parseStr(yaml::KeyValueNode &Node) {
  309 Expected<unsigned> YAMLRemarkParser::parseUnsigned(yaml::KeyValueNode &Node) {
  320 Expected<RemarkLocation>
  331     Expected<StringRef> MaybeKey = parseKey(DLNode);
  337       if (Expected<StringRef> MaybeStr = parseStr(DLNode))
  342       if (Expected<unsigned> MaybeU = parseUnsigned(DLNode))
  347       if (Expected<unsigned> MaybeU = parseUnsigned(DLNode))
  363 Expected<Argument> YAMLRemarkParser::parseArg(yaml::Node &Node) {
  373     Expected<StringRef> MaybeKey = parseKey(ArgEntry);
  385       if (Expected<RemarkLocation> MaybeLoc = parseDebugLoc(ArgEntry)) {
  397     if (Expected<StringRef> MaybeStr = parseStr(ArgEntry))
  414 Expected<std::unique_ptr<Remark>> YAMLRemarkParser::next() {
  418   Expected<std::unique_ptr<Remark>> MaybeResult = parseRemark(*YAMLIt);
  430 Expected<StringRef> YAMLStrTabRemarkParser::parseStr(yaml::KeyValueNode &Node) {
  437   if (Expected<unsigned> MaybeStrID = parseUnsigned(Node))
  442   if (Expected<StringRef> Str = (*StrTab)[StrID])
lib/Remarks/YAMLRemarkParser.h
   68   Expected<std::unique_ptr<Remark>> next() override;
   83   Expected<std::unique_ptr<Remark>> parseRemark(yaml::Document &Remark);
   85   Expected<Type> parseType(yaml::MappingNode &Node);
   87   Expected<StringRef> parseKey(yaml::KeyValueNode &Node);
   89   virtual Expected<StringRef> parseStr(yaml::KeyValueNode &Node);
   91   Expected<unsigned> parseUnsigned(yaml::KeyValueNode &Node);
   93   Expected<RemarkLocation> parseDebugLoc(yaml::KeyValueNode &Node);
   95   Expected<Argument> parseArg(yaml::Node &Node);
  109   Expected<StringRef> parseStr(yaml::KeyValueNode &Node) override;
  112 Expected<std::unique_ptr<YAMLRemarkParser>>
lib/Support/CachePruning.cpp
   51 static Expected<std::chrono::seconds> parseDuration(StringRef Duration) {
   76 Expected<CachePruningPolicy>
lib/Support/FileCheck.cpp
   28 Expected<uint64_t> FileCheckNumericVariableUse::eval() const {
   36 Expected<uint64_t> FileCheckASTBinop::eval() const {
   37   Expected<uint64_t> LeftOp = LeftOperand->eval();
   38   Expected<uint64_t> RightOp = RightOperand->eval();
   54 Expected<std::string> FileCheckNumericSubstitution::getResult() const {
   55   Expected<uint64_t> EvaluatedValue = ExpressionAST->eval();
   61 Expected<std::string> FileCheckStringSubstitution::getResult() const {
   63   Expected<StringRef> VarVal = Context->getPatternVarValue(FromStr);
   73 Expected<FileCheckPattern::VariableProperties>
  116 Expected<FileCheckNumericVariable *>
  120   Expected<VariableProperties> ParseVarResult = parseVariable(Expr, SM);
  151 Expected<std::unique_ptr<FileCheckNumericVariableUse>>
  187 Expected<std::unique_ptr<FileCheckExpressionAST>>
  194     Expected<FileCheckPattern::VariableProperties> ParseVarResult =
  223 Expected<std::unique_ptr<FileCheckExpressionAST>> FileCheckPattern::parseBinop(
  256   Expected<std::unique_ptr<FileCheckExpressionAST>> RightOpResult =
  266 Expected<std::unique_ptr<FileCheckExpressionAST>>
  289     Expected<std::unique_ptr<FileCheckExpressionAST>> ParseResult =
  308     Expected<FileCheckNumericVariable *> ParseResult =
  450         Expected<FileCheckPattern::VariableProperties> ParseVarResult =
  493         Expected<std::unique_ptr<FileCheckExpressionAST>> ParseResult =
  612 Expected<size_t> FileCheckPattern::match(StringRef Buffer, size_t &MatchLen,
  647       Expected<std::string> Value = Substitution->getResult();
  728       Expected<std::string> MatchedValue = Substitution->getResult();
  828 Expected<StringRef>
 1453     Expected<size_t> MatchResult = Pat.match(MatchBuffer, CurrentMatchLen, SM);
 1576     Expected<size_t> MatchResult = Pat->match(Buffer, MatchLen, SM);
 1637       Expected<size_t> MatchResult = Pat.match(MatchBuffer, MatchLen, SM);
 1834       Expected<std::unique_ptr<FileCheckExpressionAST>> ExpressionASTResult =
 1847       Expected<uint64_t> Value = ExpressionAST->eval();
 1864       Expected<FileCheckPattern::VariableProperties> ParseVarResult =
lib/Support/FileCheckImpl.h
   40   virtual Expected<uint64_t> eval() const = 0;
   54   Expected<uint64_t> eval() const { return Value; }
  136   Expected<uint64_t> eval() const;
  167   Expected<uint64_t> eval() const;
  205   virtual Expected<std::string> getResult() const = 0;
  216   Expected<std::string> getResult() const override;
  235   Expected<std::string> getResult() const override;
  284   Expected<StringRef> getPatternVarValue(StringRef VarName);
  460   static Expected<VariableProperties> parseVariable(StringRef &Str,
  472   static Expected<std::unique_ptr<FileCheckExpressionAST>>
  499   Expected<size_t> match(StringRef Buffer, size_t &MatchLen,
  536   static Expected<FileCheckNumericVariable *> parseNumericVariableDefinition(
  545   static Expected<std::unique_ptr<FileCheckNumericVariableUse>>
  558   static Expected<std::unique_ptr<FileCheckExpressionAST>>
  569   static Expected<std::unique_ptr<FileCheckExpressionAST>>
lib/Support/FileOutputBuffer.cpp
  117 static Expected<std::unique_ptr<InMemoryBuffer>>
  127 static Expected<std::unique_ptr<FileOutputBuffer>>
  129   Expected<fs::TempFile> FileOrErr =
  165 Expected<std::unique_ptr<FileOutputBuffer>>
lib/Support/GlobPattern.cpp
   27 static Expected<BitVector> expand(StringRef S, StringRef Original) {
   67 static Expected<BitVector> scan(StringRef &S, StringRef Original) {
   88       Expected<BitVector> BV = expand(Chars.substr(1), Original);
  108 Expected<GlobPattern> GlobPattern::create(StringRef S) {
  135     Expected<BitVector> BV = scan(S, Original);
lib/Support/JSON.cpp
  510 Expected<Value> parse(StringRef JSON) {
lib/Support/MemoryBuffer.cpp
  217     Expected<size_t> ReadBytes = sys::fs::readNativeFile(
  247   Expected<sys::fs::file_t> FDOrErr =
  366   Expected<sys::fs::file_t> FDOrErr = sys::fs::openNativeFileForReadWrite(
  466     Expected<size_t> ReadBytes =
  508   Expected<sys::fs::file_t> FDOrErr =
lib/Support/Path.cpp
 1227 Expected<TempFile> TempFile::create(const Twine &Model, unsigned Mode) {
lib/Support/TarWriter.cpp
  159 Expected<std::unique_ptr<TarWriter>> TarWriter::create(StringRef OutputPath,
lib/Support/Unix/Path.inc
  940 Expected<int> openNativeFile(const Twine &Name, CreationDisposition Disp,
  989 Expected<file_t> openNativeFileForRead(const Twine &Name, OpenFlags Flags,
 1002 Expected<size_t> readNativeFile(file_t FD, MutableArrayRef<char> Buf) {
 1010 Expected<size_t> readNativeFileSlice(file_t FD, MutableArrayRef<char> Buf,
lib/Support/Unix/Process.inc
   71 Expected<unsigned> Process::getPageSize() {
lib/Support/VirtualFileSystem.cpp
  299   Expected<file_t> FDOrErr = sys::fs::openNativeFileForRead(
lib/TextAPI/ELF/TBEHandler.cpp
  145 Expected<std::unique_ptr<ELFStub>> elfabi::readTBEFromBuffer(StringRef Buf) {
lib/TextAPI/MachO/Target.cpp
   20 Expected<Target> Target::create(StringRef TargetValue) {
lib/TextAPI/MachO/TextStub.cpp
 1107 Expected<std::unique_ptr<InterfaceFile>>
lib/ToolDrivers/llvm-dlltool/DlltoolDriver.cpp
  131   Expected<COFFModuleDefinition> Def =
lib/ToolDrivers/llvm-lib/LibDriver.cpp
  137     Expected<StringRef> NameOrErr = C.getName();
  168   Expected<std::string> TripleStr = getBitcodeTargetTriple(MB);
  213       Expected<MemoryBufferRef> ChildMB = C.getMemoryBufferRef();
  361       Expected<std::string> PathOrErr =
lib/Transforms/IPO/FunctionImport.cpp
 1076 Expected<bool> FunctionImporter::importFunctions(
 1092     Expected<std::unique_ptr<Module>> SrcModuleOrErr = ModuleLoader(Name);
 1214   Expected<std::unique_ptr<ModuleSummaryIndex>> IndexPtrOrErr =
 1258   Expected<bool> Result = Importer.importFunctions(M, ImportList);
lib/Transforms/Instrumentation/PGOInstrumentation.cpp
 1142   Expected<InstrProfRecord> Result =
lib/XRay/FDRRecordProducer.cpp
   35 Expected<std::unique_ptr<Record>>
   81 Expected<std::unique_ptr<Record>>
  112 Expected<std::unique_ptr<Record>> FileBasedRecordProducer::produce() {
lib/XRay/FileHeaderReader.cpp
   14 Expected<XRayFileHeader> readBinaryFormatHeader(DataExtractor &HeaderExtractor,
lib/XRay/InstrumentationMap.cpp
   70     Expected<StringRef> NameOrErr = Section.getName();
   82   if (Expected<StringRef> E = I->getContents())
  208 Expected<InstrumentationMap>
  219     Expected<sys::fs::file_t> FdOrErr = sys::fs::openNativeFileForRead(Filename);
lib/XRay/Profile.cpp
   51 static Expected<BlockHeader> readBlockHeader(DataExtractor &Extractor,
   78 static Expected<std::vector<Profile::FuncID>> readPath(DataExtractor &Extractor,
   96 static Expected<Profile::Data> readData(DataExtractor &Extractor,
  131 Expected<std::vector<Profile::FuncID>> Profile::expandPath(PathID P) const {
  262 Expected<Profile> loadProfile(StringRef Filename) {
  263   Expected<sys::fs::file_t> FdOrErr = sys::fs::openNativeFileForRead(Filename);
  326 Expected<Profile> profileFromTrace(const Trace &T) {
lib/XRay/Trace.cpp
  380 Expected<Trace> llvm::xray::loadTraceFile(StringRef Filename, bool Sort) {
  381   Expected<sys::fs::file_t> FdOrErr = sys::fs::openNativeFileForRead(Filename);
  418 Expected<Trace> llvm::xray::loadTrace(const DataExtractor &DE, bool Sort) {
tools/bugpoint/BugDriver.cpp
  217   Expected<bool> Diff = diffProgram(*Program, "", "", false);
tools/bugpoint/BugDriver.h
  119   Expected<std::string> compileSharedObject(const std::string &BitcodeFile);
  154   Expected<std::string> executeProgram(const Module &Program,
  163   Expected<std::string>
  177   Expected<bool> diffProgram(const Module &Program,
tools/bugpoint/CrashDebugger.cpp
   78   Expected<TestResult> doTest(std::vector<std::string> &Removed,
   83 Expected<ReducePassList::TestResult>
  131   Expected<TestResult> doTest(std::vector<GlobalVariable *> &Prefix,
  198   Expected<TestResult> doTest(std::vector<Function *> &Prefix,
  331   Expected<TestResult> doTest(std::vector<Attribute> &Prefix,
  429   Expected<TestResult> doTest(std::vector<const BasicBlock *> &Prefix,
  547   Expected<TestResult> doTest(std::vector<const BasicBlock *> &Prefix,
  652   Expected<TestResult> doTest(std::vector<const BasicBlock *> &Prefix,
  743   Expected<TestResult> doTest(std::vector<const Instruction *> &Prefix,
  819   Expected<TestResult> doTest(std::vector<std::string> &Prefix,
  886   Expected<TestResult> doTest(std::vector<const MDNode *> &Prefix,
  993     Expected<bool> Result =
 1015     Expected<bool> Result =
 1109     Expected<bool> Result =
 1138       Expected<bool> Result =
 1158     Expected<bool> Result =
 1180     Expected<bool> Result = ReduceCrashingBlocks(BD, TestFn).reduceList(Blocks);
 1193     Expected<bool> Result = ReduceSimplifyCFG(BD, TestFn).reduceList(Blocks);
 1230       Expected<bool> Result =
 1243       Expected<bool> Result =
 1281     Expected<bool> Result = ReducePassList(*this).reduceList(PassesToRun);
tools/bugpoint/ExecutionDriver.cpp
  294 Expected<std::string> BugDriver::executeProgram(const Module &Program,
  346   Expected<int> RetVal = AI->ExecuteProgram(BitcodeFile, InputArgv, InputFile,
  381 Expected<std::string>
  387 Expected<std::string>
  393   Expected<CC::FileType> FT =
  416   Expected<std::string> Result = executeProgramSafely(*Program, Filename);
  439 Expected<bool> BugDriver::diffProgram(const Module &Program,
  444   Expected<std::string> Output =
tools/bugpoint/FindBugs.cpp
   79     Expected<bool> Diff = diffProgram(*Program, Filename, "", false);
tools/bugpoint/ListReducer.h
   41   virtual Expected<TestResult> doTest(std::vector<ElTy> &Prefix,
   47   Expected<bool> reduceList(std::vector<ElTy> &TheList) {
   50     Expected<TestResult> Result = doTest(TheList, empty);
   98         Expected<TestResult> Result = doTest(ShuffledList, empty);
  123       Expected<TestResult> Result = doTest(Prefix, Suffix);
  186           Expected<TestResult> Result = doTest(EmptyList, TestList);
tools/bugpoint/Miscompilation.cpp
   52   Expected<TestResult> doTest(std::vector<std::string> &Prefix,
   60 Expected<ReduceMiscompilingPasses::TestResult>
   82   Expected<bool> Diff = BD.diffProgram(BD.getProgram(), BitcodeResult, "",
  188   Expected<bool> (*TestFn)(BugDriver &, std::unique_ptr<Module>,
  193                               Expected<bool> (*F)(BugDriver &,
  198   Expected<TestResult> doTest(std::vector<Function *> &Prefix,
  201       Expected<bool> Ret = TestFuncs(Suffix);
  208       Expected<bool> Ret = TestFuncs(Prefix);
  217   Expected<bool> TestFuncs(const std::vector<Function *> &Prefix);
  227 static Expected<std::unique_ptr<Module>> testMergedProgram(const BugDriver &BD,
  238   Expected<bool> Diff = BD.diffProgram(*Merged, "", "", false);
  248 Expected<bool>
  282   Expected<bool> Broken =
  305 static Expected<bool>
  307              Expected<bool> (*TestFn)(BugDriver &, std::unique_ptr<Module>,
  335     Expected<std::unique_ptr<Module>> New = testMergedProgram(
  377     Expected<bool> Result = TestFn(BD, std::move(ToOptimizeLoopExtracted),
  446   Expected<bool> (*TestFn)(BugDriver &, std::unique_ptr<Module>,
  452                           Expected<bool> (*F)(BugDriver &,
  458   Expected<TestResult> doTest(std::vector<BasicBlock *> &Prefix,
  461       Expected<bool> Ret = TestFuncs(Suffix);
  468       Expected<bool> Ret = TestFuncs(Prefix);
  477   Expected<bool> TestFuncs(const std::vector<BasicBlock *> &BBs);
  484 Expected<bool>
  524     Expected<bool> Ret = TestFn(BD, std::move(New), std::move(ToNotOptimize));
  535 static Expected<bool>
  537               Expected<bool> (*TestFn)(BugDriver &, std::unique_ptr<Module>,
  554   Expected<bool> Ret = ReduceMiscompiledBlocks(BD, TestFn, MiscompiledFunctions)
  561     Expected<bool> Ret =
  612 static Expected<std::vector<Function *>> DebugAMiscompilation(
  614     Expected<bool> (*TestFn)(BugDriver &, std::unique_ptr<Module>,
  628     Expected<bool> Ret = ReduceMiscompilingFunctions(BD, TestFn)
  645     Expected<bool> Ret = ExtractLoops(BD, TestFn, MiscompiledFunctions);
  669     Expected<bool> Ret = ExtractBlocks(BD, TestFn, MiscompiledFunctions);
  698 static Expected<bool> TestOptimizer(BugDriver &BD, std::unique_ptr<Module> Test,
  736     Expected<bool> Result =
  752   Expected<std::vector<Function *>> MiscompiledFunctions =
  942 static Expected<bool> TestCodeGenerator(BugDriver &BD,
  982   Expected<std::string> SharedObject =
  991   Expected<bool> Result =
 1008     Expected<std::string> Result =
 1024   Expected<std::vector<Function *>> Funcs =
 1069   Expected<std::string> SharedObject = compileSharedObject(SafeModuleBC.str());
tools/bugpoint/OptimizerDriver.cpp
  147   Expected<sys::fs::TempFile> Temp =
tools/bugpoint/ToolRunner.cpp
  156   Expected<int> ExecuteProgram(
  165 Expected<int> LLI::ExecuteProgram(const std::string &Bitcode,
  252   Expected<int> ExecuteProgram(
  301   Expected<int> ExecuteProgram(
  310 Expected<int> CustomExecutor::ExecuteProgram(
  433 Expected<CC::FileType> LLC::OutputCode(const std::string &Bitcode,
  474   Expected<CC::FileType> Result =
  482 Expected<int> LLC::ExecuteProgram(const std::string &Bitcode,
  491   Expected<CC::FileType> FileKind =
  544   Expected<int> ExecuteProgram(
  553 Expected<int> JIT::ExecuteProgram(const std::string &Bitcode,
  622 Expected<int> CC::ExecuteProgram(const std::string &ProgramFile,
tools/bugpoint/ToolRunner.h
   62   Expected<int> ExecuteProgram(
  121   virtual Expected<CC::FileType> OutputCode(const std::string &Bitcode,
  135   virtual Expected<int> ExecuteProgram(
  169   Expected<int> ExecuteProgram(
  176   Expected<CC::FileType> OutputCode(const std::string &Bitcode,
tools/clang/examples/clang-interpreter/main.cpp
   73   static Expected<std::unique_ptr<SimpleJIT>> Create() {
  101   Expected<JITEvaluatedSymbol> findSymbol(const StringRef &Name) {
  105   Expected<JITTargetAddress> getSymbolAddress(const StringRef &Name) {
tools/clang/include/clang/AST/ASTImporter.h
  292     virtual Expected<Decl *> ImportImpl(Decl *From);
  352     llvm::Expected<QualType> Import(QualType FromT);
  359     llvm::Expected<TypeSourceInfo *> Import(TypeSourceInfo *FromTSI);
  366     llvm::Expected<Attr *> Import(const Attr *FromAttr);
  373     llvm::Expected<Decl *> Import(Decl *FromD);
  374     llvm::Expected<const Decl *> Import(const Decl *FromD) {
  406     llvm::Expected<DeclContext *> ImportContext(DeclContext *FromDC);
  413     llvm::Expected<Expr *> Import(Expr *FromE);
  420     llvm::Expected<Stmt *> Import(Stmt *FromS);
  427     llvm::Expected<NestedNameSpecifier *> Import(NestedNameSpecifier *FromNNS);
  434     llvm::Expected<NestedNameSpecifierLoc>
  439     llvm::Expected<TemplateName> Import(TemplateName From);
  446     llvm::Expected<SourceLocation> Import(SourceLocation FromLoc);
  453     llvm::Expected<SourceRange> Import(SourceRange FromRange);
  460     llvm::Expected<DeclarationName> Import(DeclarationName FromName);
  474     llvm::Expected<Selector> Import(Selector FromSel);
  481     llvm::Expected<FileID> Import(FileID, bool IsBuiltin = false);
  488     llvm::Expected<CXXCtorInitializer *> Import(CXXCtorInitializer *FromInit);
  495     llvm::Expected<CXXBaseSpecifier *> Import(const CXXBaseSpecifier *FromSpec);
  528     virtual Expected<DeclarationName>
tools/clang/include/clang/Basic/FileManager.h
  283   llvm::Expected<DirectoryEntryRef> getDirectoryRef(StringRef DirName,
  339   llvm::Expected<FileEntryRef> getFileRef(StringRef Filename,
tools/clang/include/clang/CodeGen/BackendUtil.h
   49   llvm::Expected<llvm::BitcodeModule>
tools/clang/include/clang/CrossTU/CrossTranslationUnit.h
   88 llvm::Expected<llvm::StringMap<std::string>>
  127   llvm::Expected<const FunctionDecl *>
  130   llvm::Expected<const VarDecl *>
  147   llvm::Expected<ASTUnit *> loadExternalAST(StringRef LookupName,
  157   llvm::Expected<const FunctionDecl *> importDefinition(const FunctionDecl *FD,
  159   llvm::Expected<const VarDecl *> importDefinition(const VarDecl *VD,
  186   llvm::Expected<const T *> getCrossTUDefinitionImpl(const T *D,
  194   llvm::Expected<const T *> importDefinitionImpl(const T *D, ASTUnit *Unit);
  257     llvm::Expected<ASTUnit *> getASTUnitForFunction(StringRef FunctionName,
  271     llvm::Expected<std::string> getFileForFunction(StringRef FunctionName,
  277     llvm::Expected<ASTUnit *> getASTUnitForFile(StringRef FileName,
tools/clang/include/clang/DirectoryWatcher/DirectoryWatcher.h
  106   static llvm::Expected<std::unique_ptr<DirectoryWatcher>>
tools/clang/include/clang/Driver/DarwinSDKInfo.h
   35 Expected<Optional<DarwinSDKInfo>> parseDarwinSDKInfo(llvm::vfs::FileSystem &VFS,
tools/clang/include/clang/Format/Format.h
 2238 llvm::Expected<tooling::Replacements>
 2255 llvm::Expected<tooling::Replacements>
 2365 llvm::Expected<FormatStyle> getStyle(StringRef StyleName, StringRef FileName,
tools/clang/include/clang/Serialization/ASTReader.h
 2391   Expected<unsigned> readRecord(llvm::BitstreamCursor &Cursor,
tools/clang/include/clang/Tooling/CommonOptionsParser.h
   96   static llvm::Expected<CommonOptionsParser>
tools/clang/include/clang/Tooling/Core/Replacement.h
  307   llvm::Expected<Replacements>
  328 llvm::Expected<std::string> applyAllReplacements(StringRef Code,
tools/clang/include/clang/Tooling/DependencyScanning/DependencyScanningTool.h
   39   llvm::Expected<std::string> getDependencyFile(const std::string &Input,
tools/clang/include/clang/Tooling/Execution.h
  158   virtual llvm::Expected<std::unique_ptr<ToolExecutor>>
  171 llvm::Expected<std::unique_ptr<ToolExecutor>>
  177 llvm::Expected<std::unique_ptr<ToolExecutor>>
tools/clang/include/clang/Tooling/Refactoring/AtomicChange.h
  170 llvm::Expected<std::string>
tools/clang/include/clang/Tooling/Refactoring/Extract/Extract.h
   27   static Expected<ExtractFunction> initiate(RefactoringRuleContext &Context,
   38   Expected<AtomicChanges>
tools/clang/include/clang/Tooling/Refactoring/RefactoringActionRuleRequirements.h
   48   Expected<SourceRange> evaluate(RefactoringRuleContext &Context) const {
   62   Expected<SelectedASTNode> evaluate(RefactoringRuleContext &Context) const;
   76   Expected<CodeRangeASTSelection>
  105   Expected<typename OptionType::ValueType>
tools/clang/include/clang/Tooling/Refactoring/RefactoringActionRules.h
   56     Expected<AtomicChanges> Changes = createSourceReplacements(Context);
   64   virtual Expected<AtomicChanges>
   78     Expected<SymbolOccurrences> Occurrences = findSymbolOccurrences(Context);
   86   virtual Expected<SymbolOccurrences>
tools/clang/include/clang/Tooling/Refactoring/RefactoringActionRulesInternal.h
   29 void ignoreError(Expected<FirstT> &First, Expected<RestT> &... Rest) {
   29 void ignoreError(Expected<FirstT> &First, Expected<RestT> &... Rest) {
   38 llvm::Error findError(Expected<FirstT> &First, Expected<RestT> &... Rest) {
   38 llvm::Error findError(Expected<FirstT> &First, Expected<RestT> &... Rest) {
tools/clang/include/clang/Tooling/Refactoring/Rename/RenamingAction.h
   51   static Expected<RenameOccurrences> initiate(RefactoringRuleContext &Context,
   63   Expected<AtomicChanges>
   72   static Expected<QualifiedRenameRule> initiate(RefactoringRuleContext &Context,
   83   Expected<AtomicChanges>
   94 llvm::Expected<std::vector<AtomicChange>>
tools/clang/include/clang/Tooling/RefactoringCallbacks.h
   96   static llvm::Expected<std::unique_ptr<ReplaceNodeWithTemplate>>
tools/clang/include/clang/Tooling/Tooling.h
  478 llvm::Expected<std::string> getAbsolutePath(llvm::vfs::FileSystem &FS,
tools/clang/include/clang/Tooling/Transformer/MatchConsumer.h
   35     std::function<Expected<T>(const ast_matchers::MatchFinder::MatchResult &)>;
tools/clang/include/clang/Tooling/Transformer/RewriteRule.h
  277 Expected<SmallVector<Transformation, 1>>
tools/clang/include/clang/Tooling/Transformer/Stencil.h
  107   llvm::Expected<std::string>
  112   llvm::Expected<std::string>
tools/clang/include/clang/Tooling/Transformer/Transformer.h
   26       std::function<void(Expected<clang::tooling::AtomicChange> Change)>;
tools/clang/lib/AST/ASTImporter.cpp
   78   using ExpectedType = llvm::Expected<QualType>;
   79   using ExpectedStmt = llvm::Expected<Stmt *>;
   80   using ExpectedExpr = llvm::Expected<Expr *>;
   81   using ExpectedDecl = llvm::Expected<Decl *>;
   82   using ExpectedSLoc = llvm::Expected<SourceLocation>;
   83   using ExpectedName = llvm::Expected<DeclarationName>;
  162     Expected<T *> import(T *From) {
  170     Expected<T *> import(const T *From) {
  176     Expected<T> import(const T &From) {
  182     Expected<Optional<T>> import(Optional<T> From) {
  189     Expected<std::tuple<T>>
  191       Expected<T> ToOrErr = import(From);
  202     Expected<std::tuple<THead, TTail...>>
  204       Expected<std::tuple<THead>> ToHeadOrErr = importSeq(FromHead);
  207       Expected<std::tuple<TTail...>> ToTailOrErr = importSeq(FromTail...);
  367     Expected<CXXCastPath> ImportCastPath(CastExpr *E);
  405     Expected<TemplateArgument>
  420     Expected<FunctionTemplateAndArgsTy>
  487     Expected<ObjCTypeParamList *>
  618         Expected<ItemT> ToOrErr = import(*Ibegin);
  645     Expected<FunctionDecl *> FindFunctionTemplateSpecialization(
  683 Expected<ASTNodeImporter::FunctionTemplateAndArgsTy>
  705 Expected<TemplateParameterList *>
  735 Expected<TemplateArgument>
  756     Expected<ValueDecl *> ToOrErr = import(From.getAsDecl());
  773     Expected<TemplateName> ToTemplateOrErr = import(From.getAsTemplate());
  781     Expected<TemplateName> ToTemplateOrErr =
  812 Expected<TemplateArgumentLoc>
  814   Expected<TemplateArgument> ArgOrErr = import(TALoc.getArgument());
  855 Expected<DeclGroupRef> ASTNodeImporter::import(const DeclGroupRef &DG) {
  873 Expected<ASTNodeImporter::Designator>
  912 Expected<LambdaCapture> ASTNodeImporter::import(const LambdaCapture &From) {
 1261   Expected<TypedefNameDecl *> ToDeclOrErr = import(T->getDecl());
 1325   Expected<CXXRecordDecl *> ToDeclOrErr = import(T->getDecl());
 1346   Expected<RecordDecl *> ToDeclOrErr = import(T->getDecl());
 1354   Expected<EnumDecl *> ToDeclOrErr = import(T->getDecl());
 1375   Expected<TemplateTypeParmDecl *> ToDeclOrErr = import(T->getDecl());
 1434   Expected<TagDecl *> ToOwnedTagDeclOrErr = import(T->getOwnedTagDecl());
 1495   Expected<ObjCInterfaceDecl *> ToDeclOrErr = import(T->getDecl());
 1517     if (Expected<ObjCProtocolDecl *> ProtocolOrErr = import(P))
 1773       Expected<CXXMethodDecl *> ToMOrErr = import(FromM);
 1965 Expected<TemplateArgument>
 2475   Expected<LabelStmt *> ToStmtOrErr = import(D->getStmt());
 2772         if (Expected<CXXRecordDecl *> ToInstOrErr = import(FromInst))
 2874     if (Expected<TemplateParameterList *> ToTPListOrErr =
 2893     if (Expected<FunctionDecl *> InstFDOrErr =
 2944       if (Expected<FunctionTemplateDecl *> ToFTDOrErr =
 2968 Expected<FunctionDecl *>
 3149     if (Expected<ParmVarDecl *> ToPOrErr = import(P))
 3497     if (Expected<NamedDecl *> ToD = import(PI))
 3977     if (Expected<ParmVarDecl *> ToPOrErr = import(FromP))
 4092       if (Expected<ObjCProtocolDecl *> ToProtoOrErr = import(*FromProto))
 4117     if (Expected<ObjCCategoryImplDecl *> ToImplOrErr =
 4148     if (Expected<ObjCProtocolDecl *> ToProtoOrErr = import(*FromProto))
 4295     if (Expected<NamedDecl *> ToPatternOrErr = import(FromPattern))
 4303     if (Expected<UsingShadowDecl *> ToShadowOrErr = import(FromShadow))
 4323   Expected<UsingDecl *> ToUsingOrErr = import(D->getUsingDecl());
 4327   Expected<NamedDecl *> ToTargetOrErr = import(D->getTargetDecl());
 4341     if (Expected<UsingShadowDecl *> ToPatternOrErr = import(FromPattern))
 4528     if (Expected<ObjCProtocolDecl *> ToProtoOrErr = import(*FromProto))
 4554     if (Expected<ObjCImplementationDecl *> ToImplOrErr =
 4569 Expected<ObjCTypeParamList *>
 5503       if (Expected<PartVarSpecDecl *> ToInstOrErr = import(
 5872     Expected<SwitchCase *> ToSCOrErr = import(SC);
 6552     Expected<TypeSourceInfo *> ToArgumentTypeInfoOrErr =
 6712 Expected<CXXCastPath>
 6733   Expected<CXXCastPath> ToBasePathOrErr = ImportCastPath(E);
 6753   Expected<CXXCastPath> ToBasePathOrErr = ImportCastPath(E);
 7377   Expected<CXXRecordDecl *> ToNamingClassOrErr = import(E->getNamingClass());
 7857 Expected<Decl *> ASTImporter::ImportImpl(Decl *FromD) {
 7867 Expected<QualType> ASTImporter::Import(QualType FromT) {
 7891 Expected<TypeSourceInfo *> ASTImporter::Import(TypeSourceInfo *FromTSI) {
 7907 Expected<Attr *> ASTImporter::Import(const Attr *FromAttr) {
 7932 Expected<Decl *> ASTImporter::Import(Decl *FromD) {
 8058 Expected<DeclContext *> ASTImporter::ImportContext(DeclContext *FromDC) {
 8118 Expected<Expr *> ASTImporter::Import(Expr *FromE) {
 8125 Expected<Stmt *> ASTImporter::Import(Stmt *FromS) {
 8158 Expected<NestedNameSpecifier *>
 8199     if (Expected<QualType> TyOrErr =
 8213 Expected<NestedNameSpecifierLoc>
 8293 Expected<TemplateName> ASTImporter::Import(TemplateName From) {
 8387 Expected<SourceLocation> ASTImporter::Import(SourceLocation FromLoc) {
 8395   Expected<FileID> ToFileIDOrErr = Import(Decomposed.first, IsBuiltin);
 8402 Expected<SourceRange> ASTImporter::Import(SourceRange FromRange) {
 8412 Expected<FileID> ASTImporter::Import(FileID FromID, bool IsBuiltin) {
 8496 Expected<CXXCtorInitializer *> ASTImporter::Import(CXXCtorInitializer *From) {
 8560 Expected<CXXBaseSpecifier *>
 8566   Expected<SourceRange> ToSourceRange = Import(BaseSpec->getSourceRange());
 8569   Expected<TypeSourceInfo *> ToTSI = Import(BaseSpec->getTypeSourceInfo());
 8625 Expected<DeclarationName> ASTImporter::Import(DeclarationName FromName) {
 8701 Expected<Selector> ASTImporter::Import(Selector FromSel) {
 8712 Expected<DeclarationName> ASTImporter::HandleNameConflict(DeclarationName Name,
tools/clang/lib/AST/ExternalASTMerger.cpp
  126   llvm::Expected<Decl *> ImportImpl(Decl *FromD) override {
tools/clang/lib/AST/Interp/ByteCodeEmitter.cpp
   21 Expected<Function *> ByteCodeEmitter::compileFunc(const FunctionDecl *F) {
tools/clang/lib/AST/Interp/ByteCodeEmitter.h
   40   llvm::Expected<Function *> compileFunc(const FunctionDecl *F);
tools/clang/lib/AST/Interp/ByteCodeExprGen.cpp
   22 template <typename T> using Expected = llvm::Expected<T>;
tools/clang/lib/AST/Interp/ByteCodeStmtGen.cpp
   21 template <typename T> using Expected = llvm::Expected<T>;
tools/clang/lib/AST/Interp/Context.cpp
  136 InterpResult Context::Check(State &Parent, llvm::Expected<bool> &&R) {
tools/clang/lib/AST/Interp/Context.h
   84   InterpResult Check(State &Parent, llvm::Expected<bool> &&R);
tools/clang/lib/AST/Interp/EvalEmitter.cpp
   20 template <typename T> using Expected = llvm::Expected<T>;
   29 llvm::Expected<bool> EvalEmitter::interpretExpr(const Expr *E) {
   37 llvm::Expected<bool> EvalEmitter::interpretDecl(const VarDecl *VD) {
tools/clang/lib/AST/Interp/EvalEmitter.h
   42   llvm::Expected<bool> interpretExpr(const Expr *E);
   43   llvm::Expected<bool> interpretDecl(const VarDecl *VD);
tools/clang/lib/AST/Interp/Program.cpp
  194 llvm::Expected<Function *> Program::getOrCreateFunction(const FunctionDecl *F) {
tools/clang/lib/AST/Interp/Program.h
   95   llvm::Expected<Function *> getOrCreateFunction(const FunctionDecl *F);
tools/clang/lib/Basic/FileManager.cpp
  116 llvm::Expected<DirectoryEntryRef>
  202 llvm::Expected<FileEntryRef>
tools/clang/lib/CodeGen/BackendUtil.cpp
 1339 Expected<BitcodeModule> clang::FindThinLTOModule(MemoryBufferRef MBRef) {
 1340   Expected<std::vector<BitcodeModule>> BMsOrErr = getBitcodeModuleList(MBRef);
 1355     Expected<BitcodeLTOInfo> LTOInfo = BM.getLTOInfo();
 1409     Expected<BitcodeModule> BMOrErr = FindThinLTOModule(**MBOrErr);
 1508     Expected<std::unique_ptr<ModuleSummaryIndex>> IndexOrErr =
tools/clang/lib/CodeGen/CodeGenAction.cpp
  270       Expected<std::unique_ptr<llvm::ToolOutputFile>> OptRecordFileOrErr =
  912       Expected<std::unique_ptr<llvm::Module>> ModuleOrErr =
  998     Expected<std::vector<BitcodeModule>> BMsOrErr = getBitcodeModuleList(MBRef);
 1011     Expected<std::unique_ptr<llvm::Module>> MOrErr =
tools/clang/lib/CodeGen/CodeGenPGO.cpp
  969   llvm::Expected<llvm::InstrProfRecord> RecordExpected =
tools/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp
  338       if (Expected<StringRef> NameOrErr = Section.getName())
  344         if (Expected<StringRef> E = Section.getContents())
tools/clang/lib/CrossTU/CrossTranslationUnit.cpp
  131 llvm::Expected<llvm::StringMap<std::string>>
  230 llvm::Expected<const T *> CrossTranslationUnitContext::getCrossTUDefinitionImpl(
  241   llvm::Expected<ASTUnit *> ASTUnitOrError =
  303 llvm::Expected<const FunctionDecl *>
  312 llvm::Expected<const VarDecl *>
  369 llvm::Expected<ASTUnit *>
  405 llvm::Expected<ASTUnit *>
  427     if (llvm::Expected<ASTUnit *> FoundForFile =
  443 llvm::Expected<std::string>
  474 llvm::Expected<ASTUnit *> CrossTranslationUnitContext::loadExternalAST(
  483   llvm::Expected<ASTUnit *> Unit = ASTStorage.getASTUnitForFunction(
  498 llvm::Expected<const T *>
  531 llvm::Expected<const FunctionDecl *>
  537 llvm::Expected<const VarDecl *>
tools/clang/lib/DirectoryWatcher/linux/DirectoryWatcher-linux.cpp
  323 llvm::Expected<std::unique_ptr<DirectoryWatcher>> clang::DirectoryWatcher::create(
tools/clang/lib/Driver/DarwinSDKInfo.cpp
   18 Expected<Optional<DarwinSDKInfo>>
   28   Expected<llvm::json::Value> Result =
tools/clang/lib/Format/Format.cpp
 2230 static llvm::Expected<tooling::Replacements>
 2249 llvm::Expected<tooling::Replacements>
 2359 llvm::Expected<tooling::Replacements>
 2571 llvm::Expected<FormatStyle> getStyle(StringRef StyleName, StringRef FileName,
tools/clang/lib/Frontend/ASTMerge.cpp
   68       llvm::Expected<Decl *> ToDOrError = Importer.Import(D);
tools/clang/lib/Frontend/SerializedDiagnosticReader.cpp
   45     if (Expected<llvm::SimpleBitstreamCursor::word_t> Res = Stream.Read(8)) {
   57     if (Expected<unsigned> Res = Stream.ReadCode()) {
   67     Expected<unsigned> MaybeSubBlockID = Stream.ReadSubBlockID();
   76       Expected<Optional<llvm::BitstreamBlockInfo>> MaybeBlockInfo =
  122     if (Expected<unsigned> Res = Stream.ReadCode())
  134       if (Expected<unsigned> Res = Stream.ReadSubBlockID())
  195     Expected<unsigned> MaybeRecordID = Stream.readRecord(BlockOrCode, Record);
  253     Expected<unsigned> MaybeRecID =
tools/clang/lib/Frontend/TestModuleFileExtension.cpp
   51     llvm::Expected<llvm::BitstreamEntry> MaybeEntry =
   69     Expected<unsigned> MaybeRecCode =
tools/clang/lib/Serialization/ASTReader.cpp
 1158   Expected<unsigned> MaybeCode = Cursor.ReadCode();
 1165   Expected<unsigned> MaybeRecCode = Cursor.readRecord(Code, Record, &Blob);
 1208   Expected<unsigned> MaybeCode = Cursor.ReadCode();
 1215   Expected<unsigned> MaybeRecCode = Cursor.readRecord(Code, Record, &Blob);
 1337     Expected<llvm::BitstreamEntry> MaybeE =
 1360     Expected<unsigned> MaybeRecord =
 1430     Expected<unsigned> MaybeCode = SLocEntryCursor.ReadCode();
 1437     Expected<unsigned> MaybeRecCode =
 1477   Expected<llvm::BitstreamEntry> MaybeEntry = SLocEntryCursor.advance();
 1491   Expected<unsigned> MaybeSLOC =
 1634     Expected<unsigned> MaybeCode = Cursor.ReadCode();
 1693     Expected<llvm::BitstreamEntry> MaybeEntry =
 1716     if (Expected<unsigned> MaybeRecType = Stream.readRecord(Entry.ID, Record))
 1956       Expected<llvm::BitstreamEntry> MaybeE = Cursor.advanceSkippingSubblocks();
 1973         Expected<unsigned> MaybeRecord = Cursor.readRecord(E.ID, Record);
 2114     Expected<llvm::BitstreamEntry> MaybeEntry =
 2128     Expected<unsigned> MaybePP = Cursor.readRecord(Entry.ID, Record);
 2224   Expected<unsigned> MaybeCode = Cursor.ReadCode();
 2233   if (Expected<unsigned> Maybe = Cursor.readRecord(Code, Record, &Blob))
 2251   Expected<llvm::BitstreamEntry> MaybeEntry = Cursor.advance();
 2259   if (Expected<unsigned> Maybe = Cursor.readRecord(Entry.ID, Record))
 2485     Expected<llvm::BitstreamEntry> MaybeEntry = Stream.advance();
 2508     Expected<unsigned> MaybeRecordType = Stream.readRecord(Entry.ID, Record);
 2594     Expected<llvm::BitstreamEntry> MaybeEntry = Stream.advance();
 2724     Expected<unsigned> MaybeRecordType =
 2934     Expected<llvm::BitstreamEntry> MaybeEntry = Stream.advance();
 3056     Expected<unsigned> MaybeRecordType =
 4117     Expected<llvm::BitstreamEntry> MaybeEntry = Cursor.advance();
 4132       if (Expected<unsigned> Skipped = Cursor.skipRecord(Entry.ID))
 4406     if (Expected<llvm::SimpleBitstreamCursor::word_t> Res = Stream.Read(8)) {
 4509     Expected<llvm::BitstreamEntry> MaybeEntry = Stream.advance();
 4660     Expected<llvm::BitstreamEntry> MaybeEntry = Stream.advance();
 4683     Expected<unsigned> MaybeRecordType = Stream.readRecord(Entry.ID, Record);
 4740     Expected<llvm::BitstreamEntry> MaybeEntry = Stream.advance();
 4767     Expected<unsigned> MaybeRecCode =
 4957     Expected<llvm::BitstreamEntry> MaybeEntry =
 4971     Expected<unsigned> MaybeRecord = Stream.readRecord(Entry.ID, Record, &Blob);
 5015     Expected<llvm::BitstreamEntry> MaybeEntry =
 5034     Expected<unsigned> MaybeRecord = Stream.readRecord(Entry.ID, Record, &Blob);
 5132     Expected<llvm::BitstreamEntry> MaybeEntry = Stream.advance();
 5191     Expected<unsigned> MaybeRecCode =
 5239         Expected<unsigned> MaybeCode = Cursor.ReadCode();
 5249         Expected<unsigned> MaybeRecordType =
 5300         Expected<llvm::BitstreamEntry> MaybeEntry = Stream.advance();
 5329        Expected<unsigned> MaybeRecCode =
 5387     Expected<llvm::BitstreamEntry> MaybeEntry =
 5410     Expected<unsigned> MaybeKind = F.Stream.readRecord(Entry.ID, Record, &Blob);
 5898   Expected<llvm::BitstreamEntry> MaybeEntry =
 5915   Expected<unsigned> MaybeRecType =
 6336   Expected<unsigned> MaybeCode = DeclsCursor.ReadCode();
 6343   Expected<unsigned> MaybeTypeCode = DeclsCursor.readRecord(Code, Record);
 7666   Expected<unsigned> MaybeCode = Cursor.ReadCode();
 7673   Expected<unsigned> MaybeRecCode = Cursor.readRecord(Code, Record);
 7701   Expected<unsigned> MaybeCode = Cursor.ReadCode();
 7708   Expected<unsigned> MaybeRecCode = Cursor.readRecord(Code, Record);
 9755       Expected<llvm::BitstreamEntry> MaybeEntry =
 9778       Expected<unsigned> MaybeComment = Cursor.readRecord(Entry.ID, Record);
12261 Expected<unsigned> ASTRecordReader::readRecord(llvm::BitstreamCursor &Cursor,
tools/clang/lib/Serialization/ASTReaderDecl.cpp
 3632   Expected<unsigned> MaybeCode = DeclsCursor.ReadCode();
 3639   Expected<unsigned> MaybeDeclCode = Record.readRecord(DeclsCursor, Code);
 3991       Expected<unsigned> MaybeCode = Cursor.ReadCode();
 3998       if (Expected<unsigned> MaybeRecCode = Record.readRecord(Cursor, Code))
 4074   Expected<unsigned> MaybeCode = Cursor.ReadCode();
 4080   if (Expected<unsigned> MaybeRecCode = Cursor.readRecord(Code, Record))
tools/clang/lib/Serialization/ASTReaderStmt.cpp
 2453     llvm::Expected<llvm::BitstreamEntry> MaybeEntry =
 2477     Expected<unsigned> MaybeStmtCode = Record.readRecord(Cursor, Entry.ID);
tools/clang/lib/Serialization/GlobalModuleIndex.cpp
  143     if (Expected<llvm::BitstreamEntry> Res = Cursor.advance())
  180     Expected<unsigned> MaybeIndexRecord =
  270     if (Expected<llvm::SimpleBitstreamCursor::word_t> Res = Cursor.Read(8)) {
  543     if (Expected<llvm::SimpleBitstreamCursor::word_t> Res = InStream.Read(8)) {
  558     Expected<llvm::BitstreamEntry> MaybeEntry = InStream.advance();
  571         if (llvm::Expected<unsigned> Skipped = InStream.skipRecord(Entry.ID))
  621     Expected<unsigned> MaybeCode = InStream.readRecord(Entry.ID, Record, &Blob);
tools/clang/lib/StaticAnalyzer/Core/CallEvent.cpp
  576   llvm::Expected<const FunctionDecl *> CTUDeclOrError =
tools/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
  405     llvm::Expected<const VarDecl *> CTUDeclOrError =
tools/clang/lib/Tooling/AllTUsExecution.cpp
  160   llvm::Expected<std::unique_ptr<ToolExecutor>>
tools/clang/lib/Tooling/CommonOptionsParser.cpp
  157 llvm::Expected<CommonOptionsParser> CommonOptionsParser::create(
tools/clang/lib/Tooling/Core/Replacement.cpp
  219 llvm::Expected<Replacements>
  334     llvm::Expected<Replacements> Merged =
  579 llvm::Expected<std::string> applyAllReplacements(StringRef Code,
tools/clang/lib/Tooling/DependencyScanning/DependencyScanningTool.cpp
   21 llvm::Expected<std::string>
tools/clang/lib/Tooling/Execution.cpp
   57 llvm::Expected<std::unique_ptr<ToolExecutor>>
   73     llvm::Expected<std::unique_ptr<ToolExecutor>> Executor =
   89 llvm::Expected<std::unique_ptr<ToolExecutor>>
tools/clang/lib/Tooling/Refactoring/ASTSelectionRequirements.cpp
   14 Expected<SelectedASTNode>
   17   Expected<SourceRange> Range =
   30 Expected<CodeRangeASTSelection> CodeRangeASTSelectionRequirement::evaluate(
   33   Expected<SelectedASTNode> ASTSelection =
tools/clang/lib/Tooling/Refactoring/AtomicChange.cpp
  143 llvm::Expected<Replacements>
  182 llvm::Expected<Replacements>
  294 llvm::Expected<std::string>
  298   llvm::Expected<Replacements> HeaderReplacements =
  305   llvm::Expected<Replacements> Replaces =
  321     llvm::Expected<Replacements> CleanReplaces =
  330   llvm::Expected<std::string> ChangedCode =
tools/clang/lib/Tooling/Refactoring/Extract/Extract.cpp
   68 Expected<ExtractFunction>
   98 Expected<AtomicChanges>
tools/clang/lib/Tooling/Refactoring/Rename/RenamingAction.cpp
   45 Expected<SymbolOccurrences>
   65 Expected<RenameOccurrences>
   79 Expected<AtomicChanges>
   81   Expected<SymbolOccurrences> Occurrences = findSymbolOccurrences(ND, Context);
   90 Expected<QualifiedRenameRule>
  136 Expected<AtomicChanges>
  144 Expected<std::vector<AtomicChange>>
  222     Expected<std::vector<AtomicChange>> Change =
tools/clang/lib/Tooling/RefactoringCallbacks.cpp
  158 llvm::Expected<std::unique_ptr<ReplaceNodeWithTemplate>>
tools/clang/lib/Tooling/StandaloneExecution.cpp
   74   llvm::Expected<std::unique_ptr<ToolExecutor>>
tools/clang/lib/Tooling/Tooling.cpp
  225 llvm::Expected<std::string> getAbsolutePath(llvm::vfs::FileSystem &FS,
tools/clang/lib/Tooling/Transformer/RangeSelector.cpp
   55 static Expected<DynTypedNode> getNode(const ast_matchers::BoundNodes &Nodes,
  109     Expected<CharSourceRange> SelectedRange = Selector(Result);
  118     Expected<CharSourceRange> SelectedRange = Selector(Result);
  131     Expected<DynTypedNode> Node = getNode(Result.Nodes, ID);
  143     Expected<DynTypedNode> Node = getNode(Result.Nodes, ID);
  153     Expected<CharSourceRange> BeginRange = Begin(Result);
  156     Expected<CharSourceRange> EndRange = End(Result);
  176     Expected<DynTypedNode> Node = getNode(Result.Nodes, ID);
  188     Expected<DynTypedNode> N = getNode(Result.Nodes, ID);
  237   Expected<CharSourceRange> operator()(const MatchResult &Result) {
  238     Expected<DynTypedNode> N = getNode(Result.Nodes, ID);
  309     Expected<CharSourceRange> SRange = S(Result);
tools/clang/lib/Tooling/Transformer/RewriteRule.cpp
   32 Expected<SmallVector<transformer::detail::Transformation, 1>>
   37     Expected<CharSourceRange> Range = Edit.TargetRange(Result);
tools/clang/lib/Tooling/Transformer/Stencil.cpp
   34 static llvm::Expected<DynTypedNode>
  229   Expected<std::string> Value = Fn(Match);
  266 llvm::Expected<std::string>
tools/clang/tools/clang-format/ClangFormat.cpp
  406   llvm::Expected<FormatStyle> FormatStyle =
  493   llvm::Expected<clang::format::FormatStyle> FormatStyle =
tools/clang/tools/clang-import-test/clang-import-test.cpp
  297 llvm::Expected<CIAndOrigins> Parse(const std::string &Path,
  356     llvm::Expected<CIAndOrigins> ImportCI = Parse(I, {}, false, false);
  373   llvm::Expected<CIAndOrigins> ExpressionCI =
tools/clang/tools/clang-offload-bundler/ClangOffloadBundler.cpp
  135   virtual Expected<Optional<StringRef>>
  299   Expected<Optional<StringRef>> ReadBundleStart(MemoryBuffer &Input) final {
  381   static Expected<Optional<StringRef>> IsOffloadSection(SectionRef CurSection) {
  382     Expected<StringRef> NameOrErr = CurSection.getName();
  415   Expected<Optional<StringRef>> ReadBundleStart(MemoryBuffer &Input) final {
  422       Expected<Optional<StringRef>> TripleOrErr =
  435     Expected<StringRef> Content = CurrentSection->getContents();
  536   Expected<Optional<StringRef>> ReadBundleStart(MemoryBuffer &Input) final {
  621   Expected<std::unique_ptr<Binary>> BinaryOrErr = createBinary(FirstInput);
  635 static Expected<std::unique_ptr<FileHandler>>
  686   Expected<std::unique_ptr<FileHandler>> FileHandlerOrErr =
  724   Expected<std::unique_ptr<FileHandler>> FileHandlerOrErr =
  748     Expected<Optional<StringRef>> CurTripleOrErr = FH->ReadBundleStart(Input);
tools/clang/tools/clang-refactor/ClangRefactor.cpp
  429   llvm::Expected<std::unique_ptr<FrontendActionFactory>>
  531   llvm::Expected<RefactoringActionRule *>
  579   llvm::Expected<RefactoringActionSubcommand *> getSelectedSubcommand() {
tools/clang/tools/clang-refactor/TestSupport.cpp
  141   void handleResult(Expected<tooling::AtomicChanges> Result) {
  157   std::vector<std::vector<Expected<tooling::AtomicChanges>>> Results;
  182       Expected<tooling::AtomicChanges> &Result = I.value();
tools/clang/tools/clang-scan-deps/ClangScanDeps.cpp
  105                                        llvm::Expected<std::string> &MaybeFile,
tools/clang/tools/extra/clang-apply-replacements/include/clang-apply-replacements/Tooling/ApplyReplacements.h
  102 llvm::Expected<std::string>
tools/clang/tools/extra/clang-apply-replacements/lib/Tooling/ApplyReplacements.cpp
  230 llvm::Expected<std::string>
tools/clang/tools/extra/clang-apply-replacements/tool/ClangApplyReplacementsMain.cpp
  146     llvm::Expected<std::string> NewFileData =
tools/clang/tools/extra/clang-doc/BitcodeReader.cpp
  328 template <typename T> llvm::Expected<CommentInfo *> getCommentInfo(T I) {
  333 template <> llvm::Expected<CommentInfo *> getCommentInfo(FunctionInfo *I) {
  338 template <> llvm::Expected<CommentInfo *> getCommentInfo(NamespaceInfo *I) {
  343 template <> llvm::Expected<CommentInfo *> getCommentInfo(RecordInfo *I) {
  348 template <> llvm::Expected<CommentInfo *> getCommentInfo(EnumInfo *I) {
  353 template <> llvm::Expected<CommentInfo *> getCommentInfo(CommentInfo *I) {
  359 llvm::Expected<CommentInfo *> getCommentInfo(std::unique_ptr<CommentInfo> &I) {
  528   llvm::Expected<unsigned> MaybeRecID = Stream.readRecord(ID, R, &Blob);
  538   llvm::Expected<unsigned> MaybeRecID = Stream.readRecord(ID, R, &Blob);
  652     Expected<unsigned> MaybeCode = Stream.ReadCode();
  666       if (Expected<unsigned> MaybeID = Stream.ReadSubBlockID())
  699     Expected<llvm::SimpleBitstreamCursor::word_t> MaybeRead = Stream.Read(8);
  710   Expected<Optional<llvm::BitstreamBlockInfo>> MaybeBlockInfo =
  724 llvm::Expected<std::unique_ptr<Info>>
  732 llvm::Expected<std::unique_ptr<Info>>
  750 llvm::Expected<std::vector<std::unique_ptr<Info>>>
  758     Expected<unsigned> MaybeCode = Stream.ReadCode();
  764     Expected<unsigned> MaybeID = Stream.ReadSubBlockID();
tools/clang/tools/extra/clang-doc/BitcodeReader.h
   35   llvm::Expected<std::vector<std::unique_ptr<Info>>> readBitcode();
   58   llvm::Expected<std::unique_ptr<Info>> createInfo(unsigned ID);
   65   llvm::Expected<std::unique_ptr<Info>> readBlockToInfo(unsigned ID);
tools/clang/tools/extra/clang-doc/Generators.cpp
   16 llvm::Expected<std::unique_ptr<Generator>>
tools/clang/tools/extra/clang-doc/Generators.h
   42 llvm::Expected<std::unique_ptr<Generator>>
tools/clang/tools/extra/clang-doc/Representation.cpp
   34 llvm::Expected<std::unique_ptr<Info>>
   96 llvm::Expected<std::unique_ptr<Info>>
tools/clang/tools/extra/clang-doc/Representation.h
  267   llvm::Expected<Reference> getEnclosingScope();
  411 llvm::Expected<std::unique_ptr<Info>>
tools/clang/tools/extra/clang-doc/tool/ClangDocMain.cpp
  167 llvm::Expected<llvm::SmallString<128>> getInfoOutputFile(StringRef Root,
tools/clang/tools/extra/clang-include-fixer/FuzzySymbolIndex.cpp
  132 llvm::Expected<std::unique_ptr<FuzzySymbolIndex>>
tools/clang/tools/extra/clang-include-fixer/FuzzySymbolIndex.h
   35   static llvm::Expected<std::unique_ptr<FuzzySymbolIndex>>
tools/clang/tools/extra/clang-include-fixer/IncludeFixer.cpp
  401 llvm::Expected<tooling::Replacements> createIncludeFixerReplacements(
tools/clang/tools/extra/clang-include-fixer/IncludeFixer.h
   78 llvm::Expected<tooling::Replacements> createIncludeFixerReplacements(
tools/clang/tools/extra/clang-tidy/ClangTidy.cpp
  205         llvm::Expected<tooling::Replacements> Replacements =
  212         if (llvm::Expected<tooling::Replacements> FormattedReplacements =
tools/clang/tools/extra/clang-tidy/utils/TransformerClangTidyCheck.cpp
   76   Expected<SmallVector<tooling::detail::Transformation, 1>> Transformations =
   88   Expected<std::string> Explanation = Case.Explanation(Result);
tools/clang/tools/extra/clangd/ClangdLSPServer.cpp
  201                llvm::Expected<llvm::json::Value> Result) override {
  348     void operator()(llvm::Expected<llvm::json::Value> Reply) {
  626   llvm::Expected<std::string> Contents =
tools/clang/tools/extra/clangd/ClangdServer.cpp
  268 llvm::Expected<tooling::Replacements>
  270   llvm::Expected<size_t> Begin = positionToOffset(Code, Rng.start);
  273   llvm::Expected<size_t> End = positionToOffset(Code, Rng.end);
  279 llvm::Expected<tooling::Replacements>
  285 llvm::Expected<std::vector<TextEdit>>
  288   llvm::Expected<size_t> CursorPos = positionToOffset(Code, Pos);
  362 static llvm::Expected<Tweak::Selection>
  472 llvm::Expected<tooling::Replacements>
tools/clang/tools/extra/clangd/ClangdServer.h
  231   llvm::Expected<tooling::Replacements> formatRange(StringRef Code,
  235   llvm::Expected<tooling::Replacements> formatFile(StringRef Code,
  240   llvm::Expected<std::vector<TextEdit>> formatOnType(StringRef Code,
  302   llvm::Expected<tooling::Replacements>
tools/clang/tools/extra/clangd/DraftStore.cpp
   42 llvm::Expected<std::string> DraftStore::updateDraft(
   62     llvm::Expected<size_t> StartIndex =
   68     llvm::Expected<size_t> EndIndex = positionToOffset(Contents, End, false);
tools/clang/tools/extra/clangd/DraftStore.h
   44   llvm::Expected<std::string>
tools/clang/tools/extra/clangd/FindSymbols.cpp
   42 llvm::Expected<Location> symbolToLocation(const Symbol &Sym,
   66 llvm::Expected<std::vector<SymbolInformation>>
  269 llvm::Expected<std::vector<DocumentSymbol>> getDocumentSymbols(ParsedAST &AST) {
tools/clang/tools/extra/clangd/FindSymbols.h
   25 llvm::Expected<Location> symbolToLocation(const Symbol &Sym,
   38 llvm::Expected<std::vector<SymbolInformation>>
   44 llvm::Expected<std::vector<DocumentSymbol>> getDocumentSymbols(ParsedAST &AST);
tools/clang/tools/extra/clangd/Function.h
   28 using Callback = llvm::unique_function<void(llvm::Expected<T>)>;
tools/clang/tools/extra/clangd/Headers.cpp
   77 llvm::Expected<HeaderFile> toHeaderFile(llvm::StringRef Header,
tools/clang/tools/extra/clangd/Headers.h
   44 llvm::Expected<HeaderFile> toHeaderFile(llvm::StringRef Header,
tools/clang/tools/extra/clangd/JSONTransport.cpp
   66              llvm::Expected<llvm::json::Value> Result) override {
tools/clang/tools/extra/clangd/Protocol.cpp
   45 llvm::Expected<URIForFile> URIForFile::fromURI(const URI &U,
tools/clang/tools/extra/clangd/Protocol.h
   89   static llvm::Expected<URIForFile> fromURI(const URI &U,
tools/clang/tools/extra/clangd/RIFF.cpp
   20 llvm::Expected<Chunk> readChunk(llvm::StringRef &Stream) {
   51 llvm::Expected<File> readFile(llvm::StringRef Stream) {
tools/clang/tools/extra/clangd/RIFF.h
   66 llvm::Expected<Chunk> readChunk(llvm::StringRef &Stream);
   72 llvm::Expected<File> readFile(llvm::StringRef Stream);
tools/clang/tools/extra/clangd/SemanticSelection.cpp
   29 llvm::Expected<std::vector<Range>> getSemanticRanges(ParsedAST &AST,
tools/clang/tools/extra/clangd/SemanticSelection.h
   27 llvm::Expected<std::vector<Range>> getSemanticRanges(ParsedAST &AST,
tools/clang/tools/extra/clangd/SourceCode.cpp
  154 llvm::Expected<size_t> positionToOffset(llvm::StringRef Code, Position P,
  578 llvm::Expected<SourceLocation> sourceLocationInMainFile(const SourceManager &SM,
  713 llvm::Expected<tooling::Replacements>
 1006 llvm::Expected<std::string> Edit::apply() const {
tools/clang/tools/extra/clangd/SourceCode.h
   59 llvm::Expected<size_t>
   78 llvm::Expected<SourceLocation> sourceLocationInMainFile(const SourceManager &SM,
  204 llvm::Expected<tooling::Replacements>
  218   llvm::Expected<std::string> apply() const;
tools/clang/tools/extra/clangd/TUScheduler.cpp
  186              llvm::unique_function<void(llvm::Expected<InputsAndAST>)> Action);
  528     llvm::unique_function<void(llvm::Expected<InputsAndAST>)> Action) {
  932     llvm::unique_function<void(llvm::Expected<InputsAndAST>)> Action) {
tools/clang/tools/extra/clangd/Transport.h
   43                      llvm::Expected<llvm::json::Value> Result) = 0;
   54                          llvm::Expected<llvm::json::Value> Result) = 0;
tools/clang/tools/extra/clangd/URI.cpp
   35   llvm::Expected<std::string>
   50   llvm::Expected<URI>
   61 llvm::Expected<std::unique_ptr<URIScheme>>
  164 llvm::Expected<URI> URI::parse(llvm::StringRef OrigUri) {
  186 llvm::Expected<std::string> URI::resolve(llvm::StringRef FileURI,
  197 llvm::Expected<URI> URI::create(llvm::StringRef AbsolutePath,
  233 llvm::Expected<std::string> URI::resolve(const URI &Uri,
  241 llvm::Expected<std::string> URI::resolvePath(llvm::StringRef AbsPath,
  261 llvm::Expected<std::string> URI::includeSpelling(const URI &Uri) {
tools/clang/tools/extra/clangd/URI.h
   44   static llvm::Expected<URI> create(llvm::StringRef AbsolutePath,
   56   static llvm::Expected<URI> parse(llvm::StringRef Uri);
   63   static llvm::Expected<std::string> resolve(const URI &U,
   67   static llvm::Expected<std::string> resolve(llvm::StringRef FileURI,
   74   static llvm::Expected<std::string> resolvePath(llvm::StringRef AbsPath,
   85   static llvm::Expected<std::string> includeSpelling(const URI &U);
  115   virtual llvm::Expected<std::string>
  119   virtual llvm::Expected<URI>
  124   virtual llvm::Expected<std::string> getIncludeSpelling(const URI &U) const {
tools/clang/tools/extra/clangd/XRefs.cpp
 1262     if (Expected<SymbolID> ID = SymbolID::fromStr(*Item.data)) {
tools/clang/tools/extra/clangd/index/Serialization.cpp
  198 llvm::Expected<StringTableIn> readStringTable(llvm::StringRef Data) {
  424 llvm::Expected<IndexFileIn> readRIFF(llvm::StringRef Data) {
  638 llvm::Expected<IndexFileIn> readYAML(llvm::StringRef);
  652 llvm::Expected<IndexFileIn> readIndexFile(llvm::StringRef Data) {
tools/clang/tools/extra/clangd/index/Serialization.h
   52 llvm::Expected<IndexFileIn> readIndexFile(llvm::StringRef);
tools/clang/tools/extra/clangd/index/SymbolID.cpp
   35 llvm::Expected<SymbolID> SymbolID::fromStr(llvm::StringRef Str) {
tools/clang/tools/extra/clangd/index/SymbolID.h
   51   static llvm::Expected<SymbolID> fromStr(llvm::StringRef);
tools/clang/tools/extra/clangd/index/YAMLSerialization.cpp
  356 llvm::Expected<IndexFileIn> readYAML(llvm::StringRef Data) {
tools/clang/tools/extra/clangd/refactor/Rename.cpp
  161 llvm::Expected<tooling::Replacements>
tools/clang/tools/extra/clangd/refactor/Rename.h
   25 llvm::Expected<tooling::Replacements>
tools/clang/tools/extra/clangd/refactor/Tweak.cpp
   77 llvm::Expected<std::unique_ptr<Tweak>> prepareTweak(StringRef ID,
   92 llvm::Expected<std::pair<Path, Edit>>
  104 llvm::Expected<Tweak::Effect>
tools/clang/tools/extra/clangd/refactor/Tweak.h
   93     static llvm::Expected<std::pair<Path, Edit>>
   99     static llvm::Expected<Tweak::Effect>
  117   virtual Expected<Effect> apply(const Selection &Sel) = 0;
  145 llvm::Expected<std::unique_ptr<Tweak>> prepareTweak(StringRef TweakID,
tools/clang/tools/extra/clangd/refactor/tweaks/AnnotateHighlightings.cpp
   28   Expected<Effect> apply(const Selection &Inputs) override;
   36 Expected<Tweak::Effect> AnnotateHighlightings::apply(const Selection &Inputs) {
tools/clang/tools/extra/clangd/refactor/tweaks/DefineInline.cpp
  139 llvm::Expected<std::string> qualifyAllDecls(const FunctionDecl *FD) {
  324   Expected<Effect> apply(const Selection &Sel) override {
tools/clang/tools/extra/clangd/refactor/tweaks/DumpAST.cpp
   42   Expected<Effect> apply(const Selection &Inputs) override;
   60 llvm::Expected<Tweak::Effect> DumpAST::apply(const Selection &Inputs) {
   88   Expected<Effect> apply(const Selection &Inputs) override {
  117   Expected<Effect> apply(const Selection &Inputs) override {
tools/clang/tools/extra/clangd/refactor/tweaks/ExpandAutoType.cpp
   42   Expected<Effect> apply(const Selection &Inputs) override;
   73 Expected<Tweak::Effect> ExpandAutoType::apply(const Selection& Inputs) {
tools/clang/tools/extra/clangd/refactor/tweaks/ExpandMacro.cpp
   37   Expected<Tweak::Effect> apply(const Selection &Inputs) override;
  106 Expected<Tweak::Effect> ExpandMacro::apply(const Selection &Inputs) {
tools/clang/tools/extra/clangd/refactor/tweaks/ExtractFunction.cpp
  597 llvm::Expected<NewFunction> getExtractedFunction(ExtractionZone &ExtZone,
  622   Expected<Effect> apply(const Selection &Inputs) override;
  656 Expected<Tweak::Effect> ExtractFunction::apply(const Selection &Inputs) {
tools/clang/tools/extra/clangd/refactor/tweaks/ExtractVariable.cpp
  437   Expected<Effect> apply(const Selection &Inputs) override;
  460 Expected<Tweak::Effect> ExtractVariable::apply(const Selection &Inputs) {
tools/clang/tools/extra/clangd/refactor/tweaks/RawStringLiteral.cpp
   42   Expected<Effect> apply(const Selection &Inputs) override;
   90 Expected<Tweak::Effect> RawStringLiteral::apply(const Selection &Inputs) {
tools/clang/tools/extra/clangd/refactor/tweaks/RemoveUsingNamespace.cpp
   39   Expected<Effect> apply(const Selection &Inputs) override;
   70 llvm::Expected<tooling::Replacement>
  128 Expected<Tweak::Effect> RemoveUsingNamespace::apply(const Selection &Inputs) {
tools/clang/tools/extra/clangd/refactor/tweaks/SwapIfBranches.cpp
   40   Expected<Effect> apply(const Selection &Inputs) override;
   64 Expected<Tweak::Effect> SwapIfBranches::apply(const Selection &Inputs) {
tools/clang/tools/extra/clangd/tool/ClangdMain.cpp
  383   llvm::Expected<std::string>
  400   llvm::Expected<URI>
tools/clang/tools/extra/clangd/unittests/DraftStoreTests.cpp
   25   llvm::Expected<size_t> Start = positionToOffset(Code, Rng.start);
   26   llvm::Expected<size_t> End = positionToOffset(Code, Rng.end);
   51     llvm::Expected<std::string> Result = DS.updateDraft(Path, {Event});
   80   llvm::Expected<std::string> Result = DS.updateDraft(Path, Changes);
  197   Expected<std::string> Result = DS.updateDraft(File, {Change});
  218   Expected<std::string> Result = DS.updateDraft(File, {Change});
  239   Expected<std::string> Result = DS.updateDraft(File, {Change});
  260   Expected<std::string> Result = DS.updateDraft(File, {Change});
  281   Expected<std::string> Result = DS.updateDraft(File, {Change});
  301   Expected<std::string> Result = DS.updateDraft(File, {Change});
  334   Expected<std::string> Result = DS.updateDraft(File, {Change1, Change2});
tools/clang/tools/extra/clangd/unittests/JSONTransportTests.cpp
   79                llvm::Expected<llvm::json::Value> Params) override {
tools/clang/tools/extra/clangd/unittests/SyncAPI.cpp
   70 llvm::Expected<CodeCompleteResult>
   73   llvm::Optional<llvm::Expected<CodeCompleteResult>> Result;
   78 llvm::Expected<SignatureHelp> runSignatureHelp(ClangdServer &Server,
   80   llvm::Optional<llvm::Expected<SignatureHelp>> Result;
   85 llvm::Expected<std::vector<LocatedSymbol>>
   87   llvm::Optional<llvm::Expected<std::vector<LocatedSymbol>>> Result;
   92 llvm::Expected<std::vector<DocumentHighlight>>
   94   llvm::Optional<llvm::Expected<std::vector<DocumentHighlight>>> Result;
   99 llvm::Expected<std::vector<TextEdit>> runRename(ClangdServer &Server,
  102   llvm::Optional<llvm::Expected<std::vector<TextEdit>>> Result;
  113 llvm::Expected<std::vector<SymbolInformation>>
  115   llvm::Optional<llvm::Expected<std::vector<SymbolInformation>>> Result;
  120 llvm::Expected<std::vector<DocumentSymbol>>
  122   llvm::Optional<llvm::Expected<std::vector<DocumentSymbol>>> Result;
  148 llvm::Expected<std::vector<Range>>
  150   llvm::Optional<llvm::Expected<std::vector<Range>>> Result;
  155 llvm::Expected<llvm::Optional<clangd::Path>>
  157   llvm::Optional<llvm::Expected<llvm::Optional<clangd::Path>>> Result;
tools/clang/tools/extra/clangd/unittests/SyncAPI.h
   28 llvm::Expected<CodeCompleteResult>
   32 llvm::Expected<SignatureHelp> runSignatureHelp(ClangdServer &Server,
   35 llvm::Expected<std::vector<LocatedSymbol>>
   38 llvm::Expected<std::vector<DocumentHighlight>>
   41 llvm::Expected<std::vector<TextEdit>>
   46 llvm::Expected<std::vector<SymbolInformation>>
   49 Expected<std::vector<DocumentSymbol>> runDocumentSymbols(ClangdServer &Server,
   56 llvm::Expected<std::vector<Range>>
   59 llvm::Expected<llvm::Optional<clangd::Path>>
tools/clang/tools/extra/clangd/unittests/TestFS.cpp
   99   llvm::Expected<std::string>
  115   llvm::Expected<URI>
tools/clang/tools/extra/clangd/unittests/TweakTesting.cpp
  106   llvm::Expected<Tweak::Effect> Result = (*T)->apply(S);
tools/clang/tools/extra/pp-trace/PPTrace.cpp
  143     Expected<GlobPattern> Pat = GlobPattern::create(Pattern);
tools/clang/unittests/AST/ASTImporterFixtures.cpp
   90 llvm::Expected<Decl *> ASTImporterTestBase::TU::importOrError(
  202 llvm::Expected<Decl *> ASTImporterTestBase::importOrError(Decl *From,
  207   llvm::Expected<Decl *> To =
tools/clang/unittests/AST/ASTImporterFixtures.h
  122     llvm::Expected<Decl *>
  180   llvm::Expected<Decl *> importOrError(Decl *From, Language ToLang);
  197 ::testing::AssertionResult isSuccess(llvm::Expected<T> &ValOrErr) {
  206 ::testing::AssertionResult isImportError(llvm::Expected<T> &ValOrErr,
tools/clang/unittests/AST/ASTImporterODRStrategiesTest.cpp
  265   static void CheckImportedAsNew(llvm::Expected<Decl *> &Result, Decl *ToTU,
  283   static void CheckImportNameConflict(llvm::Expected<Decl *> &Result,
  290   static void CheckImportFoundExisting(llvm::Expected<Decl *> &Result,
tools/clang/unittests/AST/ASTImporterTest.cpp
   32   llvm::Expected<NodeType> importNode(ASTUnit *From, ASTUnit *To,
  298   llvm::Expected<Decl *> ImportImpl(Decl *FromD) override {
tools/clang/unittests/Basic/DiagnosticTest.cpp
   78   llvm::Expected<std::pair<int, int>> Value = DiagnosticError::create(
tools/clang/unittests/CrossTU/CrossTranslationUnitTest.cpp
   79     llvm::Expected<const FunctionDecl *> NewFDorError = handleExpected(
  164   llvm::Expected<llvm::StringMap<std::string>> IndexOrErr =
  189   llvm::Expected<llvm::StringMap<std::string>> IndexOrErr =
tools/clang/unittests/DirectoryWatcher/DirectoryWatcherTest.cpp
   68     Expected<file_t> ft = openNativeFileForWrite(getPathInWatched(testFile),
  280   llvm::Expected<std::unique_ptr<DirectoryWatcher>> DW =
  313   llvm::Expected<std::unique_ptr<DirectoryWatcher>> DW =
  335   llvm::Expected<std::unique_ptr<DirectoryWatcher>> DW =
  362   llvm::Expected<std::unique_ptr<DirectoryWatcher>> DW =
  394   llvm::Expected<std::unique_ptr<DirectoryWatcher>> DW =
  417   llvm::Expected<std::unique_ptr<DirectoryWatcher>> DW =
  439     llvm::Expected<std::unique_ptr<DirectoryWatcher>> DW =
tools/clang/unittests/Tooling/ExecutionTest.cpp
  128   llvm::Expected<std::unique_ptr<ToolExecutor>>
tools/clang/unittests/Tooling/RangeSelectorTest.cpp
   58 Expected<StringRef> select(RangeSelector Selector, const TestMatch &Match) {
   59   Expected<CharSourceRange> Range = Selector(Match.Result);
   67 Expected<CharSourceRange> selectFromTrivial(const RangeSelector &Selector) {
   86 Expected<CharSourceRange> selectFromAssorted(RangeSelector Selector) {
tools/clang/unittests/Tooling/RefactoringActionRulesTest.cpp
   36 Expected<AtomicChanges>
   50     Optional<Expected<AtomicChanges>> Result;
   66     static Expected<ReplaceAWithB>
   72     Expected<AtomicChanges>
   87     Expected<std::pair<SourceRange, int>>
   89       Expected<SourceRange> R =
  107     Expected<AtomicChanges> ErrorOrResult =
  134     Expected<AtomicChanges> ErrorOrResult =
  150     static Expected<ErrorRule> initiate(RefactoringRuleContext &,
  156     Expected<AtomicChanges> createSourceReplacements(RefactoringRuleContext &) {
  168   Expected<AtomicChanges> Result = createReplacements(Rule, RefContext);
  205     static Expected<FindOccurrences> initiate(RefactoringRuleContext &,
  210     Expected<SymbolOccurrences>
tools/clang/unittests/Tooling/RefactoringTest.cpp
 1328     llvm::Expected<std::string> ChangedCode =
tools/dsymutil/BinaryHolder.cpp
  133 Expected<const object::ObjectFile &>
  145 Expected<const BinaryHolder::ObjectEntry &>
  211 Expected<const BinaryHolder::ObjectEntry &>
tools/dsymutil/BinaryHolder.h
   65     Expected<std::vector<const ObjectFileType *>> getObjectsAs() const {
   78     Expected<const object::ObjectFile &> getObject(const Triple &T) const;
   83     Expected<const ObjectFileType &> getObjectAs(const Triple &T) const {
  110     Expected<const ObjectEntry &> getObjectEntry(StringRef Filename,
  120   Expected<const ObjectEntry &>
tools/dsymutil/DebugMap.cpp
  257         Expected<StringRef> Name = Sym.getName();
tools/dsymutil/DwarfLinker.cpp
  439   Expected<StringRef> ContentsOrErr = Section.getContents();
  491       Expected<StringRef> SymbolName = Sym->getName();
  541     if (Expected<StringRef> NameOrErr = Section.getName())
tools/dsymutil/DwarfStreamer.cpp
   34     if (Expected<StringRef> NameOrErr = Section.getName())
  686     if (Expected<StringRef> E = Sec->getContents())
tools/dsymutil/MachODebugMapParser.cpp
  481     Expected<StringRef> Name = Sym.getName();
  535     Expected<SymbolRef::Type> TypeOrErr = Sym.getType();
  555     Expected<section_iterator> SectionOrErr = Sym.getSection();
  565     Expected<StringRef> NameOrErr = Sym.getName();
tools/dsymutil/MachOUtils.cpp
   33   Expected<sys::fs::TempFile> T = sys::fs::TempFile::create(TmpModel);
tools/dsymutil/dsymutil.cpp
  105 static Expected<std::vector<std::string>> getInputs(opt::InputArgList &Args,
  188 static Expected<AccelTableKind> getAccelTableKind(opt::InputArgList &Args) {
  207 static Expected<DsymutilOptions> getOptions(opt::InputArgList &Args) {
  224   if (Expected<AccelTableKind> AccelKind = getAccelTableKind(Args)) {
  236   if (Expected<std::vector<std::string>> InputFiles =
  356   Expected<OwningBinary<Binary>> BinOrErr = createBinary(OutputFile);
  388 static Expected<OutputLocation>
  559       Expected<OutputLocation> OutputLocationOrErr =
  616       Expected<OutputLocation> OutputLocationOrErr =
tools/gold/gold-plugin.cpp
  486 template <typename T> static T check(Expected<T> E) {
  528   Expected<std::unique_ptr<InputFile>> ObjOrErr = InputFile::create(BufferRef);
  706   Expected<std::unique_ptr<InputFile>> ObjOrErr = InputFile::create(BufferRef);
tools/llc/llc.cpp
  335   Expected<std::unique_ptr<ToolOutputFile>> RemarksFileOrErr =
tools/lld/COFF/Chunks.cpp
   39   if (Expected<StringRef> e = file->getCOFFObj()->getSectionName(header))
tools/lld/COFF/DebugTypes.cpp
   44   static Expected<TypeServerSource *> getInstance(MemoryBufferRef m);
   47   static Expected<TypeServerSource *>
  173 Expected<TypeServerSource *>
  210 Expected<llvm::pdb::NativeSession *> findTypeServerSource(const ObjFile *f) {
  211   Expected<TypeServerSource *> ts = TypeServerSource::findFromFile(f);
  241   Expected<TypeServerSource *> ts = TypeServerSource::getInstance(m);
  248 Expected<TypeServerSource *> TypeServerSource::getInstance(MemoryBufferRef m) {
  259   Expected<pdb::InfoStream &> info = pdbFile.getPDBInfoStream();
tools/lld/COFF/DebugTypes.h
   54 llvm::Expected<llvm::pdb::NativeSession *>
tools/lld/COFF/Driver.cpp
  290     Expected<MemoryBufferRef> mbOrErr = c.getMemoryBufferRef();
 1155     Expected<std::unique_ptr<TarWriter>> errOrWriter =
tools/lld/COFF/DriverUtils.cpp
  739   Expected<std::unique_ptr<MemoryBuffer>> e =
tools/lld/COFF/InputFiles.cpp
  236   if (Expected<StringRef> e = coffObj->getSectionName(sec))
  318     if (Expected<StringRef> e = coffObj->getSectionName(parentSec))
  717       Expected<CVSymbol> sym = readSymbolFromStream(ss.getRecordData(), offset);
tools/lld/COFF/PDB.cpp
  124   Expected<const CVIndexMap &> mergeDebugT(ObjFile *file,
  128   Expected<const CVIndexMap &> maybeMergeTypeServerPDB(ObjFile *file);
  144   Expected<const CVIndexMap &> aquirePrecompObj(ObjFile *file);
  336 Expected<const CVIndexMap &>
  419 Expected<const CVIndexMap &> PDBLinker::maybeMergeTypeServerPDB(ObjFile *file) {
  420   Expected<llvm::pdb::NativeSession *> pdbSession = findTypeServerSource(file);
  435   Expected<pdb::TpiStream &> expectedTpi = pdbFile.getPDBTpiStream();
  440     Expected<pdb::TpiStream &> expectedIpi = pdbFile.getPDBIpiStream();
  491   Expected<const CVIndexMap &> e = aquirePrecompObj(file);
  542 Expected<const CVIndexMap &> PDBLinker::aquirePrecompObj(ObjFile *file) {
 1063 static Expected<StringRef>
tools/lld/Common/DWARF.cpp
   23     Expected<const DWARFDebugLine::LineTable *> expectedLT =
tools/lld/Common/Strings.cpp
   36     Expected<GlobPattern> pat = GlobPattern::create(s);
tools/lld/ELF/Driver.cpp
  455     Expected<std::unique_ptr<TarWriter>> errOrWriter =
 1377   Expected<GlobPattern> pat = GlobPattern::create(arg);
tools/lld/ELF/SyntheticSections.cpp
 2569     Expected<DWARFAddressRangesVector> ranges = cu->collectAddressRanges();
tools/lld/ELF/Writer.cpp
 2597   Expected<std::unique_ptr<FileOutputBuffer>> bufferOrErr =
tools/lld/include/lld/Common/ErrorHandler.h
  136 template <class T> T check(Expected<T> e) {
  150 T check2(Expected<T> e, llvm::function_ref<std::string()> prefix) {
tools/lld/include/lld/Core/Resolver.h
   44   llvm::Expected<bool> handleFile(File &);
   47   llvm::Expected<bool> handleArchiveFile(File &);
   58   typedef std::function<llvm::Expected<bool>(StringRef)> UndefCallback;
   69   llvm::Expected<bool> forEachUndefines(File &file, UndefCallback callback);
tools/lld/lib/Core/Resolver.cpp
   32 llvm::Expected<bool> Resolver::handleFile(File &file) {
   49 llvm::Expected<bool> Resolver::forEachUndefines(File &file,
   74 llvm::Expected<bool> Resolver::handleArchiveFile(File &file) {
tools/lld/lib/ReaderWriter/FileArchive.cpp
   57     Expected<StringRef> buf = c.getBuffer();
  140     Expected<llvm::MemoryBufferRef> mbOrErr = member.getMemoryBufferRef();
  174       Expected<Archive::Child> memberOrErr = sym.getMember();
tools/lld/lib/ReaderWriter/MachO/MachONormalizedFile.h
  283 llvm::Expected<std::unique_ptr<NormalizedFile>>
  295 llvm::Expected<std::unique_ptr<NormalizedFile>>
  312 llvm::Expected<std::unique_ptr<lld::File>>
  317 llvm::Expected<std::unique_ptr<NormalizedFile>>
tools/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp
  203 llvm::Expected<std::unique_ptr<NormalizedFile>>
tools/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryWriter.cpp
 1534   Expected<std::unique_ptr<llvm::FileOutputBuffer>> fobOrErr =
tools/lld/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp
 1584 llvm::Expected<std::unique_ptr<NormalizedFile>>
tools/lld/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp
  853 static Expected<const char *>
  870 static llvm::Expected<TranslationUnitSource>
 1401 llvm::Expected<std::unique_ptr<lld::File>>
 1410 llvm::Expected<std::unique_ptr<lld::File>>
 1618 llvm::Expected<std::unique_ptr<lld::File>>
tools/lld/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp
  801 llvm::Expected<std::unique_ptr<NormalizedFile>>
tools/lld/lib/ReaderWriter/MachO/WriterMachO.cpp
   32     llvm::Expected<std::unique_ptr<NormalizedFile>> nFile =
tools/lld/unittests/MachOTests/MachONormalizedFileBinaryReaderTests.cpp
   33   llvm::Expected<std::unique_ptr<NormalizedFile>> r =
tools/lld/unittests/MachOTests/MachONormalizedFileBinaryWriterTests.cpp
   37   llvm::Expected<std::unique_ptr<NormalizedFile>> r =
tools/lld/unittests/MachOTests/MachONormalizedFileToAtomsTests.cpp
   29   llvm::Expected<std::unique_ptr<const lld::File>> atom_f =
   69   llvm::Expected<std::unique_ptr<const lld::File>> atom_f =
tools/lld/unittests/MachOTests/MachONormalizedFileYAMLTests.cpp
   31   llvm::Expected<std::unique_ptr<NormalizedFile>> r
tools/lld/wasm/Driver.cpp
  666     Expected<std::unique_ptr<TarWriter>> errOrWriter =
tools/lld/wasm/Writer.cpp
 1079   Expected<std::unique_ptr<FileOutputBuffer>> bufferOrErr =
tools/lldb/include/lldb/Core/Module.h
  788   llvm::Expected<TypeSystem &>
tools/lldb/include/lldb/Host/File.h
   63   static llvm::Expected<OpenOptions> GetOptionsFromMode(llvm::StringRef mode);
   65   static llvm::Expected<const char *>
  318   virtual llvm::Expected<OpenOptions> GetOptions() const;
  320   llvm::Expected<const char *> GetOpenMode() const {
  412   llvm::Expected<OpenOptions> GetOptions() const override;
tools/lldb/include/lldb/Host/FileSystem.h
   66   llvm::Expected<std::unique_ptr<File>>
tools/lldb/include/lldb/Host/Host.h
  102   static llvm::Expected<HostThread>
tools/lldb/include/lldb/Host/HostNativeProcessBase.h
   38   virtual llvm::Expected<HostThread>
tools/lldb/include/lldb/Host/HostProcess.h
   46   llvm::Expected<HostThread>
tools/lldb/include/lldb/Host/LZMA.h
   24 llvm::Expected<uint64_t>
tools/lldb/include/lldb/Host/ThreadLauncher.h
   22   static llvm::Expected<HostThread>
tools/lldb/include/lldb/Host/common/NativeProcessProtocol.h
  108   llvm::Expected<llvm::StringRef>
  122   virtual llvm::Expected<std::vector<SVR4LibraryInfo>>
  277     virtual llvm::Expected<std::unique_ptr<NativeProcessProtocol>>
  299     virtual llvm::Expected<std::unique_ptr<NativeProcessProtocol>>
  449   virtual llvm::Expected<llvm::ArrayRef<uint8_t>>
  473   llvm::Expected<SoftwareBreakpoint>
tools/lldb/include/lldb/Host/posix/HostProcessPosix.h
   35   llvm::Expected<HostThread>
tools/lldb/include/lldb/Interpreter/Options.h
  129   llvm::Expected<Args> Parse(const Args &args,
  134   llvm::Expected<Args> ParseAlias(const Args &args,
tools/lldb/include/lldb/Interpreter/ScriptInterpreter.h
  476   virtual llvm::Expected<size_t> 
tools/lldb/include/lldb/Symbol/ClangASTImporter.h
  309     llvm::Expected<clang::Decl *> ImportImpl(clang::Decl *From) override;
tools/lldb/include/lldb/Symbol/SymbolFile.h
  210   virtual llvm::Expected<lldb_private::TypeSystem &>
  247   virtual llvm::Expected<lldb::addr_t> GetParameterStackSize(Symbol &symbol) {
tools/lldb/include/lldb/Symbol/TypeSystem.h
  514   llvm::Expected<TypeSystem &>
  518   llvm::Expected<TypeSystem &>
tools/lldb/include/lldb/Target/Process.h
  693   virtual llvm::Expected<LoadedModuleInfoList> GetLoadedModuleList() {
tools/lldb/include/lldb/Target/Target.h
 1027   llvm::Expected<TypeSystem &>
 1134   llvm::Expected<lldb_private::Address> GetEntryPointAddress();
tools/lldb/include/lldb/Utility/Reproducer.h
  162   static llvm::Expected<std::unique_ptr<DataRecorder>>
  305   template <typename T> llvm::Expected<std::string> LoadBuffer() {
tools/lldb/source/API/SBHostOS.cpp
  110   llvm::Expected<HostThread> thread =
tools/lldb/source/API/SBStream.cpp
   92   llvm::Expected<FileUP> file =
tools/lldb/source/Commands/CommandObjectReproducer.cpp
  276       Expected<std::string> version = loader->LoadBuffer<VersionProvider>();
  286       Expected<std::string> cwd =
tools/lldb/source/Core/Debugger.cpp
 1508     llvm::Expected<HostThread> event_handler_thread =
 1550     llvm::Expected<HostThread> io_handler_thread = ThreadLauncher::LaunchThread(
tools/lldb/source/Core/Module.cpp
  356 llvm::Expected<TypeSystem &>
tools/lldb/source/Host/common/File.cpp
   42 Expected<const char *>
   75 Expected<File::OpenOptions> File::GetOptionsFromMode(llvm::StringRef mode) {
  228 Expected<File::OpenOptions> File::GetOptions() const {
  249 Expected<File::OpenOptions> NativeFile::GetOptions() const { return m_options; }
tools/lldb/source/Host/common/FileSystem.cpp
  418 Expected<FileUP> FileSystem::Open(const FileSpec &file_spec,
tools/lldb/source/Host/common/Host.cpp
  102 llvm::Expected<HostThread> Host::StartMonitoringChildProcess(
tools/lldb/source/Host/common/HostProcess.cpp
   35 llvm::Expected<HostThread>
tools/lldb/source/Host/common/LZMA.cpp
   23 llvm::Expected<uint64_t>
tools/lldb/source/Host/common/MonitoringProcessLauncher.cpp
   56     llvm::Expected<HostThread> maybe_thread =
tools/lldb/source/Host/common/NativeProcessProtocol.cpp
  441 llvm::Expected<NativeProcessProtocol::SoftwareBreakpoint>
  519 llvm::Expected<llvm::ArrayRef<uint8_t>>
  667 llvm::Expected<llvm::StringRef>
tools/lldb/source/Host/common/ProcessLaunchInfo.cpp
  191     llvm::Expected<HostThread> maybe_thread =
tools/lldb/source/Host/common/TaskPool.cpp
   69     llvm::Expected<HostThread> host_thread =
tools/lldb/source/Host/common/ThreadLauncher.cpp
   24 llvm::Expected<HostThread> ThreadLauncher::LaunchThread(
tools/lldb/source/Host/posix/HostProcessPosix.cpp
   90 llvm::Expected<HostThread> HostProcessPosix::StartMonitoring(
tools/lldb/source/Initialization/SystemInitializerCommon.cpp
   81     if (llvm::Expected<std::string> cwd =
tools/lldb/source/Interpreter/CommandAlias.cpp
   45     llvm::Expected<Args> args_or =
tools/lldb/source/Interpreter/CommandObject.cpp
  107     llvm::Expected<Args> args_or = options->Parse(
tools/lldb/source/Interpreter/Options.cpp
  972 llvm::Expected<Args> Options::ParseAlias(const Args &args,
 1288 llvm::Expected<Args> Options::Parse(const Args &args,
tools/lldb/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.cpp
  497   static llvm::Expected<ReturnValueExtractor> Create(Thread &thread,
tools/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp
  225   llvm::Expected<LoadedModuleInfoList> module_list =
tools/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp
 1996   if (llvm::Expected<QualType> type_or_error =
 2016     if (llvm::Expected<Decl *> decl_or_error =
tools/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp
  197   llvm::Expected<clang::QualType> ret_or_error = exporter.Import(root);
tools/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
  211 llvm::Expected<std::unique_ptr<NativeProcessProtocol>>
  263 llvm::Expected<std::unique_ptr<NativeProcessProtocol>>
  316 llvm::Expected<std::vector<::pid_t>> NativeProcessLinux::Attach(::pid_t pid) {
 1411 llvm::Expected<llvm::ArrayRef<uint8_t>>
 1823 llvm::Expected<ProcessorTraceMonitor &>
tools/lldb/source/Plugins/Process/Linux/NativeProcessLinux.h
   43     llvm::Expected<std::unique_ptr<NativeProcessProtocol>>
   47     llvm::Expected<std::unique_ptr<NativeProcessProtocol>>
  127   llvm::Expected<llvm::ArrayRef<uint8_t>>
  149   static llvm::Expected<std::vector<::pid_t>> Attach(::pid_t pid);
  225   llvm::Expected<ProcessorTraceMonitor &>
tools/lldb/source/Plugins/Process/Linux/ProcessorTrace.cpp
  240 llvm::Expected<ProcessorTraceMonitorUP>
tools/lldb/source/Plugins/Process/Linux/ProcessorTrace.h
   98   static llvm::Expected<ProcessorTraceMonitorUP>
tools/lldb/source/Plugins/Process/POSIX/NativeProcessELF.cpp
  111 llvm::Expected<SVR4LibraryInfo>
  121   llvm::Expected<llvm::StringRef> string_or_error = ReadCStringFromMemory(
  136 llvm::Expected<std::vector<SVR4LibraryInfo>>
  165     llvm::Expected<SVR4LibraryInfo> info =
tools/lldb/source/Plugins/Process/POSIX/NativeProcessELF.h
   40   llvm::Expected<std::vector<SVR4LibraryInfo>>
   44   llvm::Expected<SVR4LibraryInfo>
tools/lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp
  499 llvm::Expected<std::vector<CoreNote>>
tools/lldb/source/Plugins/Process/elf-core/ProcessElfCore.h
  160   llvm::Expected<std::vector<lldb_private::CoreNote>>
tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
  894   llvm::Expected<HostThread> listen_thread = ThreadLauncher::LaunchThread(
tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationReplayServer.cpp
  203     llvm::Expected<HostThread> async_thread = ThreadLauncher::LaunchThread(
tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
  405 static llvm::Expected<json::Object>
  496 static llvm::Expected<json::Array>
  530       if (llvm::Expected<json::Object> registers =
  663       llvm::Expected<json::Array> threads_info = GetJSONThreadsInfo(
 2753 llvm::Expected<std::unique_ptr<llvm::MemoryBuffer>>
 3087   llvm::Expected<json::Value> threads_info = GetJSONThreadsInfo(
tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.h
  196   llvm::Expected<std::unique_ptr<llvm::MemoryBuffer>>
tools/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
 2684     llvm::Expected<LoadedModuleInfoList> list = GetLoadedModuleList();
 3627     llvm::Expected<HostThread> async_thread = ThreadLauncher::LaunchThread(
 4632 llvm::Expected<LoadedModuleInfoList> ProcessGDBRemote::GetLoadedModuleList() {
 4819   llvm::Expected<LoadedModuleInfoList> module_list = GetLoadedModuleList();
tools/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
  206   llvm::Expected<LoadedModuleInfoList> GetLoadedModuleList() override;
tools/lldb/source/Plugins/Process/minidump/MinidumpParser.cpp
   27 llvm::Expected<MinidumpParser>
  151   llvm::Expected<const SystemInfo &> system_info = m_file->getSystemInfo();
tools/lldb/source/Plugins/Process/minidump/MinidumpParser.h
   52   static llvm::Expected<MinidumpParser>
tools/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
   39 template <> Expected<bool> python::As<bool>(Expected<PythonObject> &&obj) {
   39 template <> Expected<bool> python::As<bool>(Expected<PythonObject> &&obj) {
   46 Expected<long long> python::As<long long>(Expected<PythonObject> &&obj) {
   46 Expected<long long> python::As<long long>(Expected<PythonObject> &&obj) {
   53 Expected<std::string> python::As<std::string>(Expected<PythonObject> &&obj) {
   53 Expected<std::string> python::As<std::string>(Expected<PythonObject> &&obj) {
  316 Expected<PythonString> PythonString::FromUTF8(llvm::StringRef string) {
  373 Expected<llvm::StringRef> PythonString::AsUTF8() const {
  683 Expected<PythonObject>
  699 Expected<PythonObject> PythonDictionary::GetItem(const Twine &key) const {
  766 Expected<PythonModule> PythonModule::Import(const Twine &name) {
  773 Expected<PythonObject> PythonModule::Get(const Twine &name) {
  814 Expected<PythonCallable::ArgInfo> PythonCallable::GetInitArgInfo() const {
  847 Expected<PythonCallable::ArgInfo> PythonCallable::GetArgInfo() const {
 1064   Expected<std::string> backtrace = As<std::string>(
 1079 llvm::Expected<File::OpenOptions>
 1374 llvm::Expected<FileSP> PythonFile::ConvertToFile(bool borrowed) {
 1412 llvm::Expected<FileSP>
 1481 Expected<PythonFile> PythonFile::FromFile(File &file, const char *mode) {
 1540 llvm::Expected<PythonObject>
 1571 llvm::Expected<PythonObject>
tools/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h
  324   llvm::Expected<PythonObject> CallMethod(const char *name,
  336   llvm::Expected<PythonObject> Call(const T &... t) const {
  345   llvm::Expected<PythonObject> GetAttribute(const llvm::Twine &name) const {
  354   llvm::Expected<bool> IsTrue() {
  363   llvm::Expected<long long> AsLongLong() {
  373   llvm::Expected<bool> IsInstance(const PythonObject &cls) {
  388 template <typename T> llvm::Expected<T> As(llvm::Expected<PythonObject> &&obj) {
  388 template <typename T> llvm::Expected<T> As(llvm::Expected<PythonObject> &&obj) {
  397 template <> llvm::Expected<bool> As<bool>(llvm::Expected<PythonObject> &&obj);
  397 template <> llvm::Expected<bool> As<bool>(llvm::Expected<PythonObject> &&obj);
  400 llvm::Expected<long long> As<long long>(llvm::Expected<PythonObject> &&obj);
  400 llvm::Expected<long long> As<long long>(llvm::Expected<PythonObject> &&obj);
  403 llvm::Expected<std::string> As<std::string>(llvm::Expected<PythonObject> &&obj);
  403 llvm::Expected<std::string> As<std::string>(llvm::Expected<PythonObject> &&obj);
  463   static llvm::Expected<PythonString> FromUTF8(llvm::StringRef string);
  474   llvm::Expected<llvm::StringRef> AsUTF8() const;
  576   llvm::Expected<PythonObject> GetItem(const PythonObject &key) const;
  577   llvm::Expected<PythonObject> GetItem(const llvm::Twine &key) const;
  607   static llvm::Expected<PythonModule> Import(const llvm::Twine &name);
  609   llvm::Expected<PythonObject> Get(const llvm::Twine &name);
  638   llvm::Expected<ArgInfo> GetArgInfo() const;
  640   llvm::Expected<ArgInfo> GetInitArgInfo() const;
  668   static llvm::Expected<PythonFile> FromFile(File &file,
  671   llvm::Expected<lldb::FileSP> ConvertToFile(bool borrowed = false);
  672   llvm::Expected<lldb::FileSP>
  714 template <typename T> T unwrapOrSetPythonException(llvm::Expected<T> expected) {
  727 template <typename T> T unwrapIgnoringErrors(llvm::Expected<T> expected) {
  734 llvm::Expected<PythonObject> runStringOneLine(const llvm::Twine &string,
  738 llvm::Expected<PythonObject> runStringMultiLine(const llvm::Twine &string,
  769   llvm::Expected<PythonObject> operator()(Args &&... args) {
tools/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
  785 llvm::Expected<size_t>
 1083   Expected<PythonObject> maybe_py_return =
 1195   Expected<PythonObject> return_value =
 1236   llvm::Expected<size_t> maybe_args 
tools/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h
  382   llvm::Expected<size_t> 
tools/lldb/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp
 1009   llvm::Expected<Args> args_or =
tools/lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.cpp
  362 llvm::Expected<lldb::addr_t>
tools/lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.h
  117   llvm::Expected<TypeSystem &>
  132   llvm::Expected<lldb::addr_t> GetParameterStackSize(Symbol &symbol) override;
tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFAbbreviationDeclaration.cpp
   29 llvm::Expected<DWARFEnumState>
tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFAbbreviationDeclaration.h
   52   llvm::Expected<lldb_private::DWARFEnumState>
tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFBaseDIE.cpp
  106 llvm::Expected<lldb_private::TypeSystem &> DWARFBaseDIE::GetTypeSystem() const {
tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFBaseDIE.h
   60   llvm::Expected<lldb_private::TypeSystem &> GetTypeSystem() const;
tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugAbbrev.cpp
   33     llvm::Expected<DWARFEnumState> es =
tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp
   37 llvm::Expected<DWARFDebugAranges &> DWARFDebugInfo::GetCompileUnitAranges() {
   77     llvm::Expected<DWARFUnitSP> unit_sp =
tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h
   63   llvm::Expected<DWARFDebugAranges &> GetCompileUnitAranges();
tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
  206   llvm::Expected<DWARFRangeList> expected_ranges =
tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp
  441 llvm::Expected<TypeSystem &> DWARFUnit::GetTypeSystem() {
  743 llvm::Expected<DWARFUnitHeader>
  790 llvm::Expected<DWARFUnitSP>
  847 llvm::Expected<DWARFRangeList>
  867 llvm::Expected<DWARFRangeList>
tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.h
   66   static llvm::Expected<DWARFUnitHeader>
   76   static llvm::Expected<DWARFUnitSP>
  156   llvm::Expected<lldb_private::TypeSystem &> GetTypeSystem();
  219   llvm::Expected<DWARFRangeList> FindRnglistFromOffset(dw_offset_t offset) const;
  224   llvm::Expected<DWARFRangeList> FindRnglistFromIndex(uint32_t index) const;
tools/lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.cpp
   19 llvm::Expected<std::unique_ptr<DebugNamesDWARFIndex>>
  109       llvm::Expected<DebugNames::Entry> entry_or = ni.getEntry(&entry_offset);
  129       llvm::Expected<DebugNames::Entry> entry_or = ni.getEntry(&entry_offset);
  252       llvm::Expected<DebugNames::Entry> entry_or = ni.getEntry(&entry_offset);
tools/lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.h
   21   static llvm::Expected<std::unique_ptr<DebugNamesDWARFIndex>>
tools/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
  167   llvm::Expected<const llvm::DWARFDebugLine::LineTable *> line_table =
  428 llvm::Expected<TypeSystem &>
  461       llvm::Expected<std::unique_ptr<DebugNamesDWARFIndex>> index_or =
 1734       llvm::Expected<DWARFDebugAranges &> aranges =
tools/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
  199   llvm::Expected<lldb_private::TypeSystem &>
tools/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp
  143 llvm::Expected<TypeSystem &>
tools/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.h
   33   llvm::Expected<lldb_private::TypeSystem &>
tools/lldb/source/Plugins/SymbolFile/NativePDB/PdbIndex.cpp
   41 llvm::Expected<std::unique_ptr<PdbIndex>>
tools/lldb/source/Plugins/SymbolFile/NativePDB/PdbIndex.h
  113   static llvm::Expected<std::unique_ptr<PdbIndex>>
tools/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
 1101       llvm::Expected<llvm::StringRef> efn =
 1578 llvm::Expected<TypeSystem &>
tools/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h
  136   llvm::Expected<TypeSystem &>
tools/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
 1647 llvm::Expected<lldb_private::TypeSystem &>
tools/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.h
  146   llvm::Expected<lldb_private::TypeSystem &>
tools/lldb/source/Symbol/ClangASTContext.cpp
 1276   if (llvm::Expected<clang::Decl *> ret_or_error =
tools/lldb/source/Symbol/ClangASTImporter.cpp
   68   llvm::Expected<QualType> ret_or_error = delegate_sp->Import(type);
  119   llvm::Expected<clang::Decl *> result = delegate_sp->Import(decl);
  723       llvm::Expected<Decl *> imported_or_err =
  754         llvm::Expected<Decl *> imported_or_err =
  924 llvm::Expected<Decl *>
 1014       llvm::Expected<Decl *> imported_from_superclass_decl =
tools/lldb/source/Symbol/CxxModuleHandler.cpp
  117 static llvm::Expected<DeclContext *>
  129   llvm::Expected<DeclContext *> parent =
  201   llvm::Expected<DeclContext *> to_context =
  230       llvm::Expected<QualType> type = m_importer->Import(arg.getAsType());
  240       llvm::Expected<QualType> type =
tools/lldb/source/Symbol/SymbolFile.cpp
   88 llvm::Expected<TypeSystem &>
tools/lldb/source/Symbol/TypeSystem.cpp
  220 llvm::Expected<TypeSystem &>
  289 llvm::Expected<TypeSystem &>
tools/lldb/source/Target/Process.cpp
 3525   llvm::Expected<HostThread> private_state_thread =
tools/lldb/source/Target/Target.cpp
 2116 llvm::Expected<TypeSystem &>
 2422 llvm::Expected<lldb_private::Address> Target::GetEntryPointAddress() {
tools/lldb/source/Target/ThreadPlanCallFunction.cpp
   67   llvm::Expected<Address> start_address = GetTarget().GetEntryPointAddress();
tools/lldb/source/Utility/Reproducer.cpp
  234 llvm::Expected<std::unique_ptr<DataRecorder>>
tools/lldb/source/Utility/StructuredData.cpp
   29   llvm::Expected<json::Value> value = json::parse(json_text);
tools/lldb/tools/lldb-test/lldb-test.cpp
  186 static Expected<CompilerDeclContext> getDeclContext(SymbolFile &Symfile);
  198 static Expected<Error (*)(lldb_private::Module &)> getAction();
  393 Expected<CompilerDeclContext>
  442     Expected<CompilerDeclContext> ContextOr = getDeclContext(Symfile);
  498   Expected<CompilerDeclContext> ContextOr = getDeclContext(Symfile);
  516   Expected<CompilerDeclContext> ContextOr = getDeclContext(Symfile);
  565     Expected<CompilerDeclContext> ContextOr = getDeclContext(Symfile);
  595   llvm::Expected<TypeSystem &> type_system_or_err =
  625   llvm::Expected<TypeSystem &> type_system_or_err =
  692 Expected<Error (*)(lldb_private::Module &)> opts::symbols::getAction() {
tools/lldb/tools/lldb-vscode/lldb-vscode.cpp
 2627     llvm::Expected<llvm::json::Value> json_value = llvm::json::parse(json_sref);
tools/lldb/unittests/Expression/DWARFExpressionTest.cpp
   25 static llvm::Expected<Scalar> Evaluate(llvm::ArrayRef<uint8_t> expr,
  149     llvm::Expected<DWARFUnitSP> dwarf_unit = DWARFUnit::extract(
  160   llvm::Expected<Scalar> Eval(llvm::ArrayRef<uint8_t> expr) {
tools/lldb/unittests/ObjectFile/PECOFF/TestPECallFrameInfo.cpp
   41   llvm::Expected<TestFile> ExpectedFile = TestFile::fromYaml(
tools/lldb/unittests/Process/minidump/MinidumpParserTest.cpp
   48     llvm::Expected<MinidumpParser> expected_parser =
tools/lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp
  842   Expected<PythonObject> r = runStringOneLine("n = 42", globals, globals);
tools/lldb/unittests/Symbol/TestLineEntry.cpp
   46   llvm::Expected<LineEntry> GetLineEntryForLine(uint32_t line);
   63 llvm::Expected<LineEntry> LineEntryTest::GetLineEntryForLine(uint32_t line) {
tools/lldb/unittests/TestingSupport/Host/NativeProcessTestUtils.h
   99   llvm::Expected<std::vector<uint8_t>> ReadMemoryWithoutTrap(addr_t Addr,
  124   llvm::Expected<std::vector<uint8_t>> Read(addr_t Addr, size_t Size) {
  134   llvm::Expected<size_t> Write(addr_t Addr, llvm::ArrayRef<uint8_t> Chunk) {
tools/lldb/unittests/TestingSupport/TestUtilities.cpp
   29 llvm::Expected<TestFile> TestFile::fromYaml(llvm::StringRef Yaml) {
   49 llvm::Expected<TestFile> TestFile::fromYamlFile(const llvm::Twine &Name) {
tools/lldb/unittests/TestingSupport/TestUtilities.h
   34   static llvm::Expected<TestFile> fromYaml(llvm::StringRef Yaml);
   35   static llvm::Expected<TestFile> fromYamlFile(const llvm::Twine &Name);
tools/lldb/unittests/tools/lldb-server/tests/MessageObjects.cpp
   20 Expected<ProcessInfo> ProcessInfo::create(StringRef response) {
   71 Expected<RegisterMap>
   95 Expected<JThreadsInfo> JThreadsInfo::create(StringRef Response,
  137 Expected<RegisterInfo> RegisterInfoParser::create(StringRef Response) {
  203 Expected<RegisterValue> parseRegisterValue(const RegisterInfo &Info,
  227 Expected<std::unique_ptr<StopReply>>
  239 Expected<RegisterMap> StopReplyStop::parseRegisters(
  266 Expected<std::unique_ptr<StopReplyStop>>
  327 Expected<std::unique_ptr<StopReplyExit>>
  336 Expected<StringMap<StringRef>> SplitUniquePairList(StringRef caller,
tools/lldb/unittests/tools/lldb-server/tests/MessageObjects.h
   32   static llvm::Expected<ProcessInfo> create(llvm::StringRef response);
   66   static llvm::Expected<JThreadsInfo>
   73   static llvm::Expected<RegisterMap>
   82   static llvm::Expected<lldb_private::RegisterInfo>
   86 llvm::Expected<lldb_private::RegisterValue>
   96   static llvm::Expected<std::unique_ptr<StopReply>>
  116   static llvm::Expected<std::unique_ptr<StopReplyStop>>
  132   static llvm::Expected<RegisterMap> parseRegisters(
  149   static llvm::Expected<std::unique_ptr<StopReplyExit>>
  165 llvm::Expected<llvm::StringMap<llvm::StringRef>>
tools/lldb/unittests/tools/lldb-server/tests/TestClient.cpp
   56 Expected<std::unique_ptr<TestClient>> TestClient::launch(StringRef Log) {
   60 Expected<std::unique_ptr<TestClient>> TestClient::launch(StringRef Log, ArrayRef<StringRef> InferiorArgs) {
   64 Expected<std::unique_ptr<TestClient>> TestClient::launchCustom(StringRef Log, ArrayRef<StringRef> ServerArgs, ArrayRef<StringRef> InferiorArgs) {
  169 Expected<JThreadsInfo> TestClient::GetJThreadsInfo() {
  224     Expected<RegisterInfo> InfoOr = SendMessage<RegisterInfoParser>(Message);
tools/lldb/unittests/tools/lldb-server/tests/TestClient.h
   40   static llvm::Expected<std::unique_ptr<TestClient>> launch(llvm::StringRef Log);
   44   static llvm::Expected<std::unique_ptr<TestClient>>
   50   static llvm::Expected<std::unique_ptr<TestClient>>
   61   llvm::Expected<JThreadsInfo> GetJThreadsInfo();
   63   template <typename T> llvm::Expected<const T &> GetLatestStopReplyAs() {
   78   llvm::Expected<typename P::result_type> SendMessage(llvm::StringRef Message,
  102 llvm::Expected<typename P::result_type>
tools/lli/lli.cpp
  482     Expected<object::OwningBinary<object::ObjectFile>> Obj =
  500     Expected<std::unique_ptr<object::Archive>> ArOrErr =
tools/llvm-ar/llvm-ar.cpp
  443   Expected<StringRef> DataOrErr = C.getBuffer();
  463     Expected<sys::fs::perms> ModeOrErr = C.getAccessMode();
  469     Expected<unsigned> UIDOrErr = C.getUID();
  472     Expected<unsigned> GIDOrErr = C.getGID();
  475     Expected<uint64_t> Size = C.getSize();
  529   Expected<sys::fs::perms> ModeOrErr = C.getAccessMode();
  543     Expected<StringRef> BufOrErr = C.getBuffer();
  592       Expected<StringRef> NameOrErr = C.getName();
  636   Expected<NewArchiveMember> NMOrErr =
  643     Expected<std::string> FileNameOrErr = M.getName();
  650       Expected<std::string> PathOrErr =
  658     Expected<std::string> FileNameOrErr = M.getFullName();
  676   Expected<NewArchiveMember> NMOrErr =
  689       Expected<std::string> PathOrErr =
  783       Expected<StringRef> NameOrErr = Child.getName();
  864   Expected<std::unique_ptr<object::ObjectFile>> OptionalObject =
tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp
   71 static Expected<std::unique_ptr<MemoryBuffer>> openBitcodeFile(StringRef Path) {
   73   Expected<std::unique_ptr<MemoryBuffer>> MemBufOrErr =
tools/llvm-cfi-verify/lib/FileAnalysis.cpp
   73 Expected<FileAnalysis> FileAnalysis::Create(StringRef Filename) {
   75   Expected<object::OwningBinary<object::Binary>> BinaryOrErr =
  273 Expected<DIInliningInfo>
  455     Expected<StringRef> NameOrErr = Section.getName();
  460     Expected<StringRef> Contents = Section.getContents();
tools/llvm-cfi-verify/lib/FileAnalysis.h
   87   static Expected<FileAnalysis> Create(StringRef Filename);
  149   Expected<DIInliningInfo>
tools/llvm-cov/SourceCoverageView.cpp
   54 Expected<CoveragePrinter::OwnedStream>
tools/llvm-cov/SourceCoverageView.h
   92   Expected<OwnedStream> createOutputStream(StringRef Path, StringRef Extension,
  108   virtual Expected<OwnedStream> createViewFile(StringRef Path,
tools/llvm-cov/SourceCoverageViewHTML.cpp
  283 Expected<CoveragePrinter::OwnedStream>
tools/llvm-cov/SourceCoverageViewHTML.h
   27   Expected<OwnedStream> createViewFile(StringRef Path,
tools/llvm-cov/SourceCoverageViewText.cpp
   21 Expected<CoveragePrinter::OwnedStream>
tools/llvm-cov/SourceCoverageViewText.h
   25   Expected<OwnedStream> createViewFile(StringRef Path,
tools/llvm-cov/TestingSupport.cpp
   54     if (Expected<StringRef> NameOrErr = Section.getName()) {
   78   if (Expected<StringRef> E = CoverageMapping.getContents())
   84   if (Expected<StringRef> E = ProfileNames.getContents())
tools/llvm-cvtres/llvm-cvtres.cpp
   99 template <typename T> T error(Expected<T> EC) {
  165     Expected<OwningBinary<Binary>> BinaryOrErr = createBinary(File);
  209     Expected<OwningBinary<Binary>> BinaryOrErr = createBinary(OutputFile);
tools/llvm-cxxdump/llvm-cxxdump.cpp
   59 T unwrapOrError(Expected<T> EO) {
   94       Expected<StringRef> RelocSymName = RelocSymI->getName();
  116       Expected<StringRef> RelocSymName = RelocSymI->getName();
  177     Expected<section_iterator> ErrOrSec = Section.getRelocatedSection();
  194     Expected<StringRef> SymNameOrErr = Sym.getName();
  197     Expected<object::section_iterator> SecIOrErr = Sym.getSection();
  208     Expected<uint64_t> SymAddressOrErr = Sym.getAddress();
  502     Expected<std::unique_ptr<Binary>> ChildOrErr = ArcC.getAsBinary();
  527   Expected<OwningBinary<Binary>> BinaryOrErr = createBinary(File);
tools/llvm-dwarfdump/llvm-dwarfdump.cpp
  487   Expected<std::unique_ptr<Binary>> BinOrErr = object::createBinary(Buffer);
tools/llvm-dwp/llvm-dwp.cpp
  119 static Expected<const char *>
  135 static Expected<CompileUnitIdentifiers> getCUIdentifiers(StringRef Abbrev,
  171       Expected<const char *> EName =
  179       Expected<const char *> EName =
  378   Expected<Decompressor> Dec =
  409   Expected<StringRef> NameOrErr = Section.getName();
  414   Expected<StringRef> ContentsOrErr = Section.getContents();
  476 static Expected<SmallVector<std::string, 16>>
  569       Expected<CompileUnitIdentifiers> EID = getCUIdentifiers(
  594       Expected<CompileUnitIdentifiers> EID = getCUIdentifiers(
tools/llvm-elfabi/ELFObjHandler.cpp
   47 static Expected<StringRef> terminatedSubstr(StringRef Str, size_t Offset) {
  182 static Expected<uint64_t> getNumSyms(DynamicEntries &Dyn,
  188     Expected<const uint8_t *> TablePtr = ElfFile.toMappedAddr(*Dyn.GnuHash);
  197     Expected<const uint8_t *> TablePtr = ElfFile.toMappedAddr(*Dyn.ElfHash);
  276     Expected<StringRef> SymName = terminatedSubstr(DynStr, RawSym.st_name);
  289 static Expected<std::unique_ptr<ELFStub>>
  298   Expected<Elf_Dyn_Range> DynTable = ElfFile->dynamicEntries();
  304   Expected<Elf_Phdr_Range> PHdrs = ElfFile->program_headers();
  315   Expected<const uint8_t *> DynStrPtr =
  329     Expected<StringRef> NameOrErr =
  339     Expected<StringRef> LibNameOrErr =
  348   Expected<uint64_t> SymCount = getNumSyms(DynEnt, *ElfFile);
  353     Expected<const uint8_t *> DynSymPtr =
  370 Expected<std::unique_ptr<ELFStub>> readELFFile(MemoryBufferRef Buf) {
  371   Expected<std::unique_ptr<Binary>> BinOrErr = createBinary(Buf);
tools/llvm-elfabi/ELFObjHandler.h
   27 Expected<std::unique_ptr<ELFStub>> readELFFile(MemoryBufferRef Buf);
tools/llvm-elfabi/llvm-elfabi.cpp
   73 static Expected<std::unique_ptr<ELFStub>> readInputFile(StringRef FilePath) {
   88     Expected<std::unique_ptr<ELFStub>> StubFromELF =
   99     Expected<std::unique_ptr<ELFStub>> StubFromTBE =
  121   Expected<std::unique_ptr<ELFStub>> StubOrErr = readInputFile(InputFilePath);
tools/llvm-exegesis/lib/BenchmarkResult.cpp
  334 Expected<InstructionBenchmark>
  351 Expected<std::vector<InstructionBenchmark>>
tools/llvm-exegesis/lib/BenchmarkResult.h
   78   static Expected<InstructionBenchmark> readYaml(const LLVMState &State,
   81   static Expected<std::vector<InstructionBenchmark>>
tools/llvm-exegesis/lib/BenchmarkRunner.cpp
   44   Expected<int64_t> runAndMeasure(const char *Counters) const override {
  157 Expected<std::string>
tools/llvm-exegesis/lib/BenchmarkRunner.h
   68     virtual Expected<int64_t> runAndMeasure(const char *Counters) const = 0;
   76   virtual Expected<std::vector<BenchmarkMeasure>>
   79   Expected<std::string> writeObjectFile(const BenchmarkCode &Configuration,
tools/llvm-exegesis/lib/Clustering.cpp
  316 Expected<InstructionBenchmarkClustering> InstructionBenchmarkClustering::create(
tools/llvm-exegesis/lib/Clustering.h
   32   static Expected<InstructionBenchmarkClustering>
tools/llvm-exegesis/lib/Latency.cpp
  154 Expected<std::vector<CodeTemplate>>
  182 Expected<std::vector<BenchmarkMeasure>> LatencyBenchmarkRunner::runMeasurements(
tools/llvm-exegesis/lib/Latency.h
   30   Expected<std::vector<CodeTemplate>>
   42   Expected<std::vector<BenchmarkMeasure>>
tools/llvm-exegesis/lib/SnippetFile.cpp
  119 Expected<std::vector<BenchmarkCode>> readSnippets(const LLVMState &State,
tools/llvm-exegesis/lib/SnippetFile.h
   29 Expected<std::vector<BenchmarkCode>> readSnippets(const LLVMState &State,
tools/llvm-exegesis/lib/SnippetGenerator.cpp
   41 Expected<std::vector<BenchmarkCode>> SnippetGenerator::generateConfigurations(
  136 Expected<std::vector<CodeTemplate>>
  157 Expected<std::vector<CodeTemplate>>
tools/llvm-exegesis/lib/SnippetGenerator.h
   36 Expected<std::vector<CodeTemplate>>
   40 Expected<std::vector<CodeTemplate>>
   62   Expected<std::vector<BenchmarkCode>>
   76   virtual Expected<std::vector<CodeTemplate>>
tools/llvm-exegesis/lib/Uops.cpp
  160 Expected<std::vector<CodeTemplate>> UopsSnippetGenerator::generateCodeTemplates(
  222 Expected<std::vector<BenchmarkMeasure>>
tools/llvm-exegesis/lib/Uops.h
   28   Expected<std::vector<CodeTemplate>>
   72   Expected<std::vector<BenchmarkMeasure>>
tools/llvm-exegesis/lib/X86/Target.cpp
  188 static Expected<std::vector<CodeTemplate>> generateLEATemplatesCommon(
  249   Expected<std::vector<CodeTemplate>>
  255 Expected<std::vector<CodeTemplate>>
  299   Expected<std::vector<CodeTemplate>>
  306 Expected<std::vector<CodeTemplate>>
tools/llvm-exegesis/llvm-exegesis.cpp
  207 static Expected<std::vector<BenchmarkCode>>
tools/llvm-ifs/llvm-ifs.cpp
  202 static Expected<std::unique_ptr<IFSStub>> readInputFile(StringRef FilePath) {
  410     Expected<std::unique_ptr<IFSStub>> StubOrErr = readInputFile(InputFilePath);
tools/llvm-jitlink/llvm-jitlink-macho.cpp
   29 static Expected<Edge &> getFirstRelocationEdge(LinkGraph &G, Block &B) {
   40 static Expected<Symbol &> getMachOGOTTarget(LinkGraph &G, Block &B) {
   61 static Expected<Symbol &> getMachOStubTarget(LinkGraph &G, Block &B) {
tools/llvm-jitlink/llvm-jitlink.cpp
  231   static Expected<std::unique_ptr<JITLinkSlabAllocator>>
  241   Expected<std::unique_ptr<JITLinkMemoryManager::Allocation>>
  364 Expected<uint64_t> getSlabAllocSize(StringRef SizeString) {
  460 Expected<Session::FileInfo &> Session::findFileInfo(StringRef FileName) {
  468 Expected<Session::MemoryRegionInfo &>
  482 Expected<Session::MemoryRegionInfo &>
  496 Expected<Session::MemoryRegionInfo &>
  514 Expected<Session::MemoryRegionInfo &>
  762 static Expected<JITEvaluatedSymbol> getMainEntryPoint(Session &S) {
  766 Expected<int> runEntryPoint(Session &S, JITEvaluatedSymbol EntryPoint) {
tools/llvm-jitlink/llvm-jitlink.h
   50   Expected<FileInfo &> findFileInfo(StringRef FileName);
   51   Expected<MemoryRegionInfo &> findSectionInfo(StringRef FileName,
   53   Expected<MemoryRegionInfo &> findStubInfo(StringRef FileName,
   55   Expected<MemoryRegionInfo &> findGOTEntryInfo(StringRef FileName,
   59   Expected<MemoryRegionInfo &> findSymbolInfo(StringRef SymbolName,
tools/llvm-lipo/llvm-lipo.cpp
  179       Expected<std::unique_ptr<Binary>> ChildOrErr = Child.getAsBinary();
  435     Expected<OwningBinary<Binary>> BinaryOrErr = createBinary(IF.FileName);
  474       Expected<MachOUniversalBinary::ObjectForArch> Obj =
  495       Expected<std::unique_ptr<MachOObjectFile>> MachOObjOrError =
  501       Expected<std::unique_ptr<Archive>> ArchiveOrError = O.getAsArchive();
  561   Expected<std::unique_ptr<MachOObjectFile>> Obj =
  563   Expected<std::unique_ptr<Archive>> Ar = UO->getArchiveForArch(ThinArchType);
  570   Expected<std::unique_ptr<FileOutputBuffer>> OutFileOrError =
  633         Expected<std::unique_ptr<MachOObjectFile>> BinaryOrError =
  693   Expected<std::unique_ptr<FileOutputBuffer>> OutFileOrError =
tools/llvm-lto2/llvm-lto2.cpp
  149 template <typename T> static T check(Expected<T> E, std::string Msg) {
tools/llvm-mca/CodeRegionGenerator.cpp
  109 Expected<const CodeRegions &> AsmCodeRegionGenerator::parseCodeRegions() {
tools/llvm-mca/CodeRegionGenerator.h
   42   virtual Expected<const CodeRegions &> parseCodeRegions() = 0;
   63   Expected<const CodeRegions &> parseCodeRegions() override;
tools/llvm-mca/llvm-mca.cpp
  279   Expected<unsigned> Cycles = P.run();
  380   Expected<const mca::CodeRegions &> RegionsOrErr = CRG.parseCodeRegions();
  468       Expected<std::unique_ptr<mca::Instruction>> Inst =
tools/llvm-mt/llvm-mt.cpp
  150   Expected<std::unique_ptr<FileOutputBuffer>> FileOrErr =
tools/llvm-nm/llvm-nm.cpp
  245   Expected<StringRef> NameOrErr = C.getName();
  506       Expected<section_iterator> SecOrErr =
  523     if (Expected<StringRef> NameOrErr = MachO->getSectionName(Ref))
  895   Expected<elf_section_iterator> SecIOrErr = SymI->getSection();
  939   Expected<StringRef> Name = SymI->getName();
  955     Expected<section_iterator> SecIOrErr = SymI->getSection();
  963     if (Expected<StringRef> NameOrErr = Obj.getSectionName(Section))
 1015     Expected<section_iterator> SecOrErr = Obj.getSymbolSection(Symb);
 1025     if (Expected<StringRef> NameOrErr = Obj.getSectionName(Ref))
 1094       Expected<elf_section_iterator> SecIOrErr = SymI->getSection();
 1103       Expected<StringRef> NameOrErr = (*SecIOrErr)->getName();
 1159     if (Expected<StringRef> NameOrErr = Obj->getSectionName(Ref))
 1228         Expected<uint64_t> AddressOrErr = SymRef.getAddress();
 1365               if (Expected<StringRef> NameOrErr = Section.getName())
 1689             if (Expected<StringRef> NameOrErr = Section.getName())
 1784   Expected<std::unique_ptr<Binary>> BinaryOrErr =
 1799           Expected<Archive::Child> C = I->getMember();
 1804           Expected<StringRef> FileNameOrErr = C->getName();
 1819         Expected<std::unique_ptr<Binary>> ChildOrErr =
 1862             Expected<std::unique_ptr<ObjectFile>> ObjOrErr =
 1885             } else if (Expected<std::unique_ptr<Archive>> AOrErr =
 1890                 Expected<std::unique_ptr<Binary>> ChildOrErr =
 1947           Expected<std::unique_ptr<ObjectFile>> ObjOrErr = I->getAsObjectFile();
 1956           } else if (Expected<std::unique_ptr<Archive>> AOrErr =
 1961               Expected<std::unique_ptr<Binary>> ChildOrErr =
 1997       Expected<std::unique_ptr<ObjectFile>> ObjOrErr = O.getAsObjectFile();
 2021       } else if (Expected<std::unique_ptr<Archive>> AOrErr =
 2026           Expected<std::unique_ptr<Binary>> ChildOrErr =
tools/llvm-objcopy/Buffer.cpp
   24   Expected<sys::fs::TempFile> Temp =
   38   Expected<std::unique_ptr<FileOutputBuffer>> BufferOrErr =
tools/llvm-objcopy/COFF/COFFObjcopy.cpp
  219   Expected<std::unique_ptr<Object>> ObjOrErr = Reader.create();
tools/llvm-objcopy/COFF/Reader.cpp
   73     if (Expected<StringRef> NameOrErr = COFFObj.getSectionName(Sec))
   90     Expected<COFFSymbolRef> SymOrErr = COFFObj.getSymbol(I);
  193 Expected<std::unique_ptr<Object>> COFFReader::create() const {
tools/llvm-objcopy/COFF/Reader.h
   35   Expected<std::unique_ptr<Object>> create() const;
tools/llvm-objcopy/CopyConfig.cpp
  114 static Expected<SectionFlag>
  132 static Expected<SectionRename> parseRenameSectionValue(StringRef FlagValue) {
  148     Expected<SectionFlag> ParsedFlagSet =
  158 static Expected<std::pair<StringRef, uint64_t>>
  177 static Expected<SectionFlagsUpdate>
  191   Expected<SectionFlag> ParsedFlagSet = parseSectionFlagSet(SectionFlags);
  239 static Expected<TargetInfo>
  287 Expected<NameOrPattern>
  300     Expected<GlobPattern> GlobOrErr = GlobPattern::create(Pattern);
  369 Expected<DriverConfig>
  461       Expected<TargetInfo> Target =
  539     Expected<SectionRename> SR =
  549     Expected<std::pair<StringRef, uint64_t>> NameAndAlign =
  556     Expected<SectionFlagsUpdate> SFU =
  758 Expected<DriverConfig>
tools/llvm-objcopy/CopyConfig.h
  113   static Expected<NameOrPattern>
  131   Error addMatcher(Expected<NameOrPattern> Matcher) {
  229       Expected<elf::ELFCopyConfig> ELFConfig = elf::parseConfig(*this);
  250 Expected<DriverConfig>
  258 Expected<DriverConfig>
tools/llvm-objcopy/ELF/ELFConfig.cpp
   19 static Expected<NewSymbolInfo> parseNewSymbolInfo(StringRef FlagValue,
  101 Expected<ELFCopyConfig> parseConfig(const CopyConfig &Config) {
  120     Expected<elf::NewSymbolInfo> NSI = parseNewSymbolInfo(
tools/llvm-objcopy/ELF/ELFConfig.h
   38 Expected<ELFCopyConfig> parseConfig(const CopyConfig &Config);
tools/llvm-objcopy/ELF/ELFObjcopy.cpp
  168 static Expected<ArrayRef<uint8_t>>
  191 static Expected<ArrayRef<uint8_t>>
  292       Expected<std::unique_ptr<FileOutputBuffer>> BufferOrErr =
tools/llvm-objcopy/ELF/Object.cpp
  271 Expected<IHexRecord> IHexRecord::parse(StringRef Line) {
 1633 Expected<std::vector<IHexRecord>> IHexReader::parse() const {
 1645     Expected<IHexRecord> R = IHexRecord::parse(Line);
tools/llvm-objcopy/ELF/Object.h
  221   static Expected<IHexRecord> parse(StringRef Line);
  955   Expected<std::vector<IHexRecord>> parse() const;
tools/llvm-objcopy/MachO/MachOReader.cpp
   86     Expected<object::SectionRef> SecRef =
   91     if (Expected<ArrayRef<uint8_t>> E =
tools/llvm-objcopy/llvm-objcopy.cpp
  184     Expected<StringRef> ChildNameOrErr = Child.getName();
  188     Expected<std::unique_ptr<Binary>> ChildOrErr = Child.getAsBinary();
  197     Expected<NewArchiveMember> Member =
  286     Expected<OwningBinary<llvm::object::Binary>> BinaryOrErr =
  336   Expected<DriverConfig> DriverConfig =
tools/llvm-objcopy/llvm-objcopy.h
   29 template <class T> T unwrapOrError(Expected<T> EO) {
tools/llvm-objdump/COFFDump.cpp
  162   Expected<uint64_t> ResolvedAddrOrErr = Sym.getAddress();
  166   Expected<section_iterator> Iter = Sym.getSection();
  212   Expected<StringRef> NameOrErr = Sym.getName();
  480   Expected<StringRef> SymNameOrErr = SymI->getName();
  661     Expected<COFFSymbolRef> Symbol = coff->getSymbol(SI);
tools/llvm-objdump/ELFDump.cpp
   25 static Expected<StringRef> getDynamicStrTab(const ELFFile<ELFT> *Elf) {
   87       Expected<section_iterator> SymSI = SI->getSection();
   97       Expected<StringRef> SymName = SI->getName();
  175       Expected<StringRef> StrTabOrErr = getDynamicStrTab(Elf);
tools/llvm-objdump/MachODump.cpp
  238     Expected<SymbolRef::Type> ATypeOrErr = A.getType();
  242     Expected<SymbolRef::Type> BTypeOrErr = B.getType();
  490       if (Expected<StringRef> NameOrErr = SI->getName())
  990             Expected<StringRef> SymNameNext = Symbol.getName();
 1024                 if (Expected<StringRef> NameOrErr = O->getSectionName(DRI))
 1080           if (Expected<StringRef> NameOrErr = O->getSectionName(DRI))
 1100           if (Expected<StringRef> NameOrErr = O->getSectionName(DRI))
 1534     Expected<StringRef> SectNameOrErr = Sect->getName();
 1751       Expected<StringRef> SecNameOrErr = Section.getName();
 1852     Expected<StringRef> SecNameOrErr = Section.getName();
 1954       if (Expected<StringRef> NameOrErr = Section.getName())
 2269     Expected<StringRef> NameOrErr = C.getName();
 2326   Expected<OwningBinary<Binary>> BinaryOrErr = createBinary(Filename);
 2345       Expected<std::unique_ptr<Binary>> ChildOrErr = C.getAsBinary();
 2399           Expected<std::unique_ptr<ObjectFile>> ObjOrErr =
 2412           } else if (Expected<std::unique_ptr<Archive>> AOrErr =
 2426               Expected<std::unique_ptr<Binary>> ChildOrErr = C.getAsBinary();
 2466         Expected<std::unique_ptr<ObjectFile>> ObjOrErr = I->getAsObjectFile();
 2476         } else if (Expected<std::unique_ptr<Archive>> AOrErr =
 2487             Expected<std::unique_ptr<Binary>> ChildOrErr = C.getAsBinary();
 2516     Expected<std::unique_ptr<ObjectFile>> ObjOrErr = I->getAsObjectFile();
 2527     } else if (Expected<std::unique_ptr<Archive>> AOrErr = I->getAsArchive()) {
 2540         Expected<std::unique_ptr<Binary>> ChildOrErr = C.getAsBinary();
 3291       Expected<StringRef> SecNameOrErr =
 4089     Expected<StringRef> SecNameOrErr = Section.getName();
 4111   Expected<StringRef> SecNameOrErr = S.getName();
 5839   Expected<StringRef> SecNameOrErr = S.getName();
 5907   Expected<StringRef> SecNameOrErr = S.getName();
 5958   Expected<StringRef> SecNameOrErr = S.getName();
 6020   Expected<StringRef> SecNameOrErr = S.getName();
 6075   Expected<StringRef> SecNameOrErr = S.getName();
 7369       Expected<std::unique_ptr<Binary>> BinaryOrErr =
 7404         Expected<std::unique_ptr<MachOObjectFile>> MachDSYM =
 7430     Expected<StringRef> SecNameOrErr = Sections[SectIdx].getName();
 7833     if (Expected<StringRef> NameOrErr = RelocSection.getName())
 7856   if (Expected<StringRef> NameOrErr = RelocSection.getName())
 8225     if (Expected<StringRef> NameOrErr = Section.getName())
tools/llvm-objdump/WasmDump.cpp
   41     Expected<StringRef> SymNameOrErr = SI->getName();
tools/llvm-objdump/llvm-objdump.cpp
  363   Expected<StringRef> SecNameOrErr = S.getName();
  398   Expected<StringRef> NameOrErr = C.getName();
  951     Expected<StringRef> SecNameOrErr = Section.getName();
 1000     Expected<section_iterator> RelocatedOrErr = Sec.getRelocatedSection();
 1503               Expected<section_iterator> SymSI =
 1624     Expected<section_iterator> SecOrErr = Section.getRelocatedSection();
 1820       if (Expected<StringRef> NameOrErr = Section->getName())
 1948     if (Expected<StringRef> NameOrErr = Sec.getName())
 1984     if (Expected<StringRef> NameOrErr = Sec.getName())
 2044   Expected<sys::fs::perms> ModeOrErr = C.getAccessMode();
 2081   Expected<StringRef> NameOrErr = C.getName();
 2215     Expected<std::unique_ptr<Binary>> ChildOrErr = C.getAsBinary();
tools/llvm-objdump/llvm-objdump.h
  149 T unwrapOrError(Expected<T> EO, Ts &&... Args) {
tools/llvm-opt-report/OptReport.cpp
  157   Expected<remarks::Format> Format = remarks::parseFormat(ParserFormat);
  166   Expected<std::unique_ptr<remarks::RemarkParser>> MaybeParser =
  178     Expected<std::unique_ptr<remarks::Remark>> MaybeRemark = Parser.next();
tools/llvm-pdbutil/BytesOutputStyle.cpp
   42 static Expected<StreamSpec> parseStreamSpec(StringRef Str) {
  445 Expected<codeview::LazyRandomTypeCollection &>
tools/llvm-pdbutil/BytesOutputStyle.h
   54   Expected<codeview::LazyRandomTypeCollection &>
tools/llvm-pdbutil/DumpOutputStyle.cpp
  412 static Expected<ModuleDebugStreamRef> getModuleDebugStream(PDBFile &File,
  499 static Expected<std::pair<std::unique_ptr<MappedBlockStream>,
 1372     Expected<StringRef> NameOrErr = S.getName();
 1386     Expected<StringRef> ContentsOrErr = S.getContents();
 1816       Expected<CVSymbol> Sym = readSymbolFromStream(SymStream, PubSymOff);
tools/llvm-pdbutil/InputFile.cpp
   37 static Expected<ModuleDebugStreamRef>
   69   if (Expected<StringRef> NameOrErr = Section.getName()) {
   77   Expected<StringRef> ContentsOrErr = Section.getContents();
  208 Expected<StringRef> SymbolGroup::getNameFromStringTable(uint32_t Offset) const {
  254 Expected<InputFile> InputFile::open(StringRef Path, bool AllowUnknownFile) {
  266     Expected<OwningBinary<Binary>> BinaryOrErr = createBinary(Path);
tools/llvm-pdbutil/InputFile.h
   61   static Expected<InputFile> open(StringRef Path,
   94   Expected<StringRef> getNameFromStringTable(uint32_t Offset) const;
tools/llvm-pdbutil/MinimalSymbolDumper.cpp
  482     Expected<StringRef> FileName =
  730         if (Expected<StringRef> MaybeFile =
tools/llvm-pdbutil/MinimalTypeDumper.cpp
   40     Expected<TypeIndex> ETI =
  234       Expected<uint32_t> MaybeHash = hashTypeRecord(Record);
tools/llvm-pdbutil/YAMLOutputStyle.cpp
  354     Expected<CVSymbol> Sym = readSymbolFromStream(SymStream, PubSymOff);
tools/llvm-rc/ResourceFileWriter.cpp
 1505 Expected<std::unique_ptr<MemoryBuffer>>
tools/llvm-rc/ResourceFileWriter.h
  206   Expected<std::unique_ptr<MemoryBuffer>> loadFile(StringRef File) const;
tools/llvm-rc/ResourceScriptParser.cpp
  148 Expected<RCInt> RCParser::readInt() {
  153 Expected<IntWithNotMask> RCParser::parseIntExpr1() {
  187 Expected<IntWithNotMask> RCParser::parseIntExpr2() {
  229 Expected<StringRef> RCParser::readString() {
  235 Expected<StringRef> RCParser::readFilename() {
  241 Expected<StringRef> RCParser::readIdentifier() {
  247 Expected<IntOrString> RCParser::readIntOrString() {
  253 Expected<IntOrString> RCParser::readTypeOrName() {
  289 Expected<SmallVector<RCInt, 8>> RCParser::readIntsWithCommas(size_t MinCount,
  321 Expected<uint32_t> RCParser::parseFlags(ArrayRef<StringRef> FlagDesc,
  379 Expected<OptionalStmtList>
  392 Expected<std::unique_ptr<OptionalStmt>>
  533 Expected<Control> RCParser::parseControl() {
  626 Expected<MenuDefinitionList> RCParser::parseMenuItemsList() {
  708 Expected<std::unique_ptr<VersionInfoBlock>>
  724 Expected<std::unique_ptr<VersionInfoStmt>> RCParser::parseVersionInfoStmt() {
  756 Expected<VersionInfoResource::VersionInfoFixed>
tools/llvm-rc/ResourceScriptParser.h
   35   using ParseType = Expected<std::unique_ptr<RCResource>>;
   36   using ParseOptionType = Expected<std::unique_ptr<OptionalStmt>>;
   83   Expected<RCInt> readInt();               // Parse an integer.
   84   Expected<StringRef> readString();        // Parse a string.
   85   Expected<StringRef> readIdentifier();    // Parse an identifier.
   86   Expected<StringRef> readFilename();      // Parse a filename.
   87   Expected<IntOrString> readIntOrString(); // Parse an integer or a string.
   88   Expected<IntOrString> readTypeOrName();  // Parse an integer or an identifier.
   91   Expected<IntWithNotMask> parseIntExpr1();
   92   Expected<IntWithNotMask> parseIntExpr2();
  106   Expected<SmallVector<RCInt, 8>> readIntsWithCommas(size_t MinCount,
  114   Expected<uint32_t> parseFlags(ArrayRef<StringRef> FlagDesc,
  133   Expected<OptionalStmtList>
  137   Expected<std::unique_ptr<OptionalStmt>>
  154   Expected<Control> parseControl();
  157   Expected<MenuDefinitionList> parseMenuItemsList();
  161   Expected<std::unique_ptr<VersionInfoBlock>>
  164   Expected<std::unique_ptr<VersionInfoStmt>> parseVersionInfoStmt();
  166   Expected<VersionInfoResource::VersionInfoFixed> parseVersionInfoFixed();
tools/llvm-rc/ResourceScriptToken.cpp
   89   Expected<std::vector<RCToken>> run();
  155 Expected<std::vector<RCToken>> Tokenizer::run() {
  362 Expected<std::vector<RCToken>> tokenizeRC(StringRef Input) {
tools/llvm-rc/ResourceScriptToken.h
   77 Expected<std::vector<RCToken>> tokenizeRC(StringRef Input);
tools/llvm-readobj/ARMEHABIPrinter.h
  436   Expected<ArrayRef<uint8_t>> Contents = ELF->getSectionContents(EHT);
  503   Expected<ArrayRef<uint8_t>> Contents = ELF->getSectionContents(IT);
tools/llvm-readobj/ARMWinEHPrinter.cpp
  226     Expected<SymbolRef::Type> Type = Symbol.getType();
  232     Expected<uint64_t> Address = Symbol.getAddress();
  903     Expected<StringRef> Name = Symbol->getName();
  942     Expected<StringRef> FunctionNameOrErr = Function->getName();
  951     Expected<uint64_t> FunctionAddressOrErr = Function->getAddress();
  967     Expected<StringRef> Name = XDataRecord->getName();
  976     Expected<uint64_t> AddressOrErr = XDataRecord->getAddress();
  988     Expected<section_iterator> SIOrErr = XDataRecord->getSection();
 1025     Expected<StringRef> FunctionNameOrErr = Function->getName();
 1034     Expected<uint64_t> FunctionAddressOrErr = Function->getAddress();
 1098     Expected<StringRef> NameOrErr =
tools/llvm-readobj/COFFDumper.cpp
  285   Expected<StringRef> NameOrErr = Symbol.getName();
 1401     Expected<StringRef> SymbolNameOrErr = Symbol->getName();
 1434 static Expected<StringRef>
 1464   if (Expected<StringRef> NameOrErr =
 1495       Expected<COFFSymbolRef> Linked = Obj->getSymbol(Aux->TagIndex);
 1539         Expected<StringRef> Res = getSectionName(Obj, AuxNumber, Assoc);
 1551       Expected<COFFSymbolRef> ReferredSym =
 1888     if (Expected<StringRef> NameOrErr = Sec.getName())
 1919     if (Expected<StringRef> NameOrErr = Sec.getName())
 1948     Expected<COFFSymbolRef> Sym = Obj->getSymbol(SymIndex);
tools/llvm-readobj/ELFDumper.cpp
  305   Expected<std::string> getStaticSymbolName(uint32_t Index) const;
  757 Expected<std::string>
  760   Expected<const typename ELFT::Sym *> SymOrErr =
  765   Expected<StringRef> StrTabOrErr = Obj->getStringTableForSymtab(*DotSymtabSec);
  769   Expected<StringRef> NameOrErr = (*SymOrErr)->getName(*StrTabOrErr);
 1583         if (Expected<StringRef> E = Obj->getStringTableForSymtab(Sec))
 3641   Expected<StringRef> ErrOrName = Sym->getName(Dumper->getDynamicStringTable());
 4535 static Expected<CoreNote> readCoreNote(DataExtractor Desc) {
 4649         Expected<CoreNote> Note = readCoreNote(DescExtractor);
 4698   Expected<StringRef> NameOrErr = Sec.getName();
 4708   Expected<StringRef> NameOrErr = Sym.getName();
 4723     Expected<uint64_t> SymAddrOrErr = Symbol.getAddress();
 4803     Expected<uint64_t> RelocSymValueOrErr = RelocSym->getValue();
 4877     if (Expected<StringRef> NameOrErr = Sec.getName())
 4897     Expected<section_iterator> RelSecOrErr = Sec.getRelocatedSection();
 4907     Expected<StringRef> ContentsSectionNameOrErr =
 5758 static Expected<std::vector<uint64_t>> toULEB128Array(ArrayRef<uint8_t> Data) {
 5781   Expected<std::vector<uint64_t>> V = toULEB128Array(Contents);
 5788     Expected<std::string> NameOrErr = this->dumper()->getStaticSymbolName(Sym);
 5895         Expected<CoreNote> Note = readCoreNote(DescExtractor);
tools/llvm-readobj/MachODumper.cpp
  557       Expected<StringRef> TargetNameOrErr = Symbol->getName();
  621   Expected<StringRef> SymbolNameOrErr = Symbol.getName();
  632   Expected<section_iterator> SecIOrErr = Symbol.getSection();
  668     if (Expected<StringRef> NameOrErr = Sec.getName())
tools/llvm-readobj/Win64EHDumper.cpp
  122     Expected<StringRef> Name = Symbol.getName();
  150   Expected<uint64_t> ResolvedAddressOrErr = Symbol.getAddress();
  155   Expected<section_iterator> SI = Symbol.getSection();
  309     if (Expected<StringRef> NameOrErr = Section.getName())
tools/llvm-readobj/llvm-readobj.cpp
  555     Expected<std::unique_ptr<Binary>> ChildOrErr = Child.getAsBinary();
  577     Expected<std::unique_ptr<MachOObjectFile>> ObjOrErr = Obj.getAsObjectFile();
  582     else if (Expected<std::unique_ptr<Archive>> AOrErr = Obj.getAsArchive())
  599   Expected<OwningBinary<Binary>> BinaryOrErr = createBinary(File);
tools/llvm-readobj/llvm-readobj.h
   27   template <class T> T unwrapOrError(StringRef Input, Expected<T> EO) {
tools/llvm-rtdyld/llvm-rtdyld.cpp
  171 Expected<unsigned> getSectionId(const FileToSectionIDMap &FileToSecIDMap,
  380     Expected<std::unique_ptr<ObjectFile>> MaybeObj(
  423       Expected<SymbolRef::Type> TypeOrErr = Sym.getType();
  431         Expected<StringRef> Name = Sym.getName();
  437         Expected<uint64_t> AddrOrErr = Sym.getAddress();
  515       Expected<std::unique_ptr<ObjectFile>> MaybeObj(
  812       using ExpectedLookupResult = Expected<JITSymbolResolver::LookupResult>;
  907     Expected<std::unique_ptr<ObjectFile>> MaybeObj(
tools/llvm-size/llvm-size.cpp
  123   Expected<StringRef> NameOrErr = C.getName();
  388       Expected<StringRef> name_or_err = Section.getName();
  426       Expected<StringRef> name_or_err = Section.getName();
  542   Expected<OwningBinary<Binary>> BinaryOrErr = createBinary(file);
  553       Expected<std::unique_ptr<Binary>> ChildOrErr = C.getAsBinary();
  591             Expected<std::unique_ptr<ObjectFile>> UO = I->getAsObjectFile();
  615             } else if (Expected<std::unique_ptr<Archive>> AOrErr =
  622                 Expected<std::unique_ptr<Binary>> ChildOrErr = C.getAsBinary();
  682           Expected<std::unique_ptr<ObjectFile>> UO = I->getAsObjectFile();
  704           } else if (Expected<std::unique_ptr<Archive>> AOrErr =
  711               Expected<std::unique_ptr<Binary>> ChildOrErr = C.getAsBinary();
  757       Expected<std::unique_ptr<ObjectFile>> UO = I->getAsObjectFile();
  781       } else if (Expected<std::unique_ptr<Archive>> AOrErr =
  787           Expected<std::unique_ptr<Binary>> ChildOrErr = C.getAsBinary();
tools/llvm-symbolizer/llvm-symbolizer.cpp
  165 static bool error(Expected<T> &ResOrErr) {
tools/llvm-xray/xray-graph-diff.cpp
  226 Expected<GraphDiffRenderer> GraphDiffRenderer::Factory::getGraphDiffRenderer() {
tools/llvm-xray/xray-graph-diff.h
   53     Expected<GraphDiffRenderer> getGraphDiffRenderer();
tools/llvm-xray/xray-graph.cpp
  424 Expected<GraphRenderer> GraphRenderer::Factory::getGraphRenderer() {
tools/llvm-xray/xray-graph.h
  151     Expected<GraphRenderer> getGraphRenderer();
tools/obj2yaml/coff2yaml.cpp
  110     Expected<StringRef> SectionNameOrErr = S.getName();
  158     if (Expected<StringRef> NameOrErr = ObjSection.getName())
  201       Expected<StringRef> SymbolNameOrErr = Sym->getName();
tools/obj2yaml/elf2yaml.cpp
   42   Expected<StringRef> getUniquedSectionName(const Elf_Shdr *Sec);
   43   Expected<StringRef> getUniquedSymbolName(const Elf_Sym *Sym,
   46   Expected<StringRef> getSymbolName(uint32_t SymtabNdx, uint32_t SymbolNdx);
   62   Expected<ELFYAML::AddrsigSection *> dumpAddrsigSection(const Elf_Shdr *Shdr);
   63   Expected<ELFYAML::DynamicSection *> dumpDynamicSection(const Elf_Shdr *Shdr);
   64   Expected<ELFYAML::RelocationSection *> dumpRelocSection(const Elf_Shdr *Shdr);
   65   Expected<ELFYAML::RawContentSection *>
   67   Expected<ELFYAML::SymtabShndxSection *>
   69   Expected<ELFYAML::NoBitsSection *> dumpNoBitsSection(const Elf_Shdr *Shdr);
   70   Expected<ELFYAML::HashSection *> dumpHashSection(const Elf_Shdr *Shdr);
   71   Expected<ELFYAML::NoteSection *> dumpNoteSection(const Elf_Shdr *Shdr);
   72   Expected<ELFYAML::VerdefSection *> dumpVerdefSection(const Elf_Shdr *Shdr);
   73   Expected<ELFYAML::SymverSection *> dumpSymverSection(const Elf_Shdr *Shdr);
   74   Expected<ELFYAML::VerneedSection *> dumpVerneedSection(const Elf_Shdr *Shdr);
   75   Expected<ELFYAML::Group *> dumpGroup(const Elf_Shdr *Shdr);
   76   Expected<ELFYAML::MipsABIFlags *> dumpMipsABIFlags(const Elf_Shdr *Shdr);
   77   Expected<ELFYAML::StackSizesSection *>
   80   Expected<ELFYAML::Section *> dumpSpecialSection(const Elf_Shdr *Shdr);
   84   Expected<ELFYAML::Object *> dump();
   94 Expected<StringRef>
  116 Expected<StringRef>
  119   Expected<StringRef> SymbolNameOrErr = Sym->getName(StrTable);
  150 template <class ELFT> Expected<ELFYAML::Object *> ELFDumper<ELFT>::dump() {
  220       Expected<ELFYAML::DynamicSection *> SecOrErr = dumpDynamicSection(&Sec);
  232       Expected<ELFYAML::SymtabShndxSection *> SecOrErr =
  241       Expected<ELFYAML::RelocationSection *> SecOrErr = dumpRelocSection(&Sec);
  248       Expected<ELFYAML::Group *> GroupOrErr = dumpGroup(&Sec);
  255       Expected<ELFYAML::MipsABIFlags *> SecOrErr = dumpMipsABIFlags(&Sec);
  262       Expected<ELFYAML::NoBitsSection *> SecOrErr = dumpNoBitsSection(&Sec);
  269       Expected<ELFYAML::NoteSection *> SecOrErr = dumpNoteSection(&Sec);
  276       Expected<ELFYAML::HashSection *> SecOrErr = dumpHashSection(&Sec);
  283       Expected<ELFYAML::VerdefSection *> SecOrErr = dumpVerdefSection(&Sec);
  290       Expected<ELFYAML::SymverSection *> SecOrErr = dumpSymverSection(&Sec);
  297       Expected<ELFYAML::VerneedSection *> SecOrErr = dumpVerneedSection(&Sec);
  304       Expected<ELFYAML::AddrsigSection *> SecOrErr = dumpAddrsigSection(&Sec);
  325         Expected<ELFYAML::Section *> SpecialSecOrErr = dumpSpecialSection(&Sec);
  334       Expected<ELFYAML::RawContentSection *> SecOrErr =
  385   Expected<StringRef> SymbolNameOrErr =
  436   Expected<StringRef> NameOrErr =
  481 Expected<ELFYAML::Section *>
  511 Expected<ELFYAML::StackSizesSection *>
  544 Expected<ELFYAML::AddrsigSection *>
  563     Expected<StringRef> SymbolName = getSymbolName(Shdr->sh_link, SymNdx);
  584 Expected<ELFYAML::DynamicSection *>
  601 Expected<ELFYAML::RelocationSection *>
  639 Expected<ELFYAML::RawContentSection *>
  663 Expected<ELFYAML::SymtabShndxSection *>
  678 Expected<ELFYAML::NoBitsSection *>
  689 Expected<ELFYAML::NoteSection *>
  725 Expected<ELFYAML::HashSection *>
  766 Expected<ELFYAML::VerdefSection *>
  816 Expected<ELFYAML::SymverSection *>
  834 Expected<ELFYAML::VerneedSection *>
  891 Expected<StringRef> ELFDumper<ELFT>::getSymbolName(uint32_t SymtabNdx,
  909 Expected<ELFYAML::Group *> ELFDumper<ELFT>::dumpGroup(const Elf_Shdr *Shdr) {
  915   Expected<StringRef> SymbolName = getSymbolName(Shdr->sh_link, Shdr->sh_info);
  942 Expected<ELFYAML::MipsABIFlags *>
  973   Expected<ELFYAML::Object *> YAMLOrErr = Dumper.dump();
tools/obj2yaml/macho2yaml.cpp
   53   Expected<std::unique_ptr<MachOYAML::Object>> dump();
  192 Expected<std::unique_ptr<MachOYAML::Object>> MachODumper::dump() {
  501   Expected<std::unique_ptr<MachOYAML::Object>> YAML = Dumper.dump();
  535     Expected<std::unique_ptr<MachOYAML::Object>> YAMLObj = Dumper.dump();
tools/obj2yaml/obj2yaml.cpp
   37   Expected<OwningBinary<Binary>> BinaryOrErr = createBinary(File);
tools/obj2yaml/xcoff2yaml.cpp
   61     Expected<StringRef> SymNameRefOrErr = Obj.getSymbolName(SymbolDRI);
   69     Expected<StringRef> SectionNameRefOrErr =
tools/opt/opt.cpp
  557   Expected<std::unique_ptr<ToolOutputFile>> RemarksFileOrErr =
tools/polly/lib/Exchange/JSONExporter.cpp
  710   Expected<json::Value> ParseResult =
tools/sancov/sancov.cpp
  202 template <typename T> static void failIfError(Expected<T> &E) {
  627               Expected<StringRef> Name = Symbol.getName();
  650     Expected<uint64_t> AddressOrErr = Symbol.getAddress();
  654     Expected<StringRef> NameOrErr = Symbol.getName();
  751     Expected<StringRef> BytesStr = Section.getContents();
  781     Expected<std::unique_ptr<object::Binary>> ChildOrErr = C.getAsBinary();
  794   Expected<object::OwningBinary<object::Binary>> BinaryOrErr =
tools/sanstats/sanstats.cpp
   89     if (Expected<DILineInfo> LineInfo = Symbolizer.symbolizeCode(
tools/verify-uselistorder/verify-uselistorder.cpp
  160   Expected<std::unique_ptr<Module>> ModuleOr =
unittests/ADT/FallibleIteratorTest.cpp
   95   Expected<Item &> operator*() {
  102   Expected<const Item &> operator*() const {
  276   Expected<Item> V1 = *I;
  280   Expected<Item> V2 = *I;
  284   Expected<Item> V3 = *I;
unittests/Bitcode/BitReaderTest.cpp
   53   Expected<std::unique_ptr<Module>> ModuleOrErr =
unittests/Bitstream/BitstreamReaderTest.cpp
   25   Expected<SimpleBitstreamCursor::word_t> MaybeRead = Cursor.Read(8);
   61     Expected<SimpleBitstreamCursor::word_t> MaybeRead = Cursor.Read(1);
  122     Expected<SimpleBitstreamCursor::word_t> MaybeRead = Stream.Read(32);
  127     Expected<BitstreamEntry> MaybeEntry =
  145     Expected<unsigned> MaybeRecord =
  158     Expected<SimpleBitstreamCursor::word_t> MaybeRead = Cursor.Read(8);
unittests/DebugInfo/DWARF/DwarfGenerator.cpp
  383 llvm::Expected<std::unique_ptr<dwarfgen::Generator>>
unittests/DebugInfo/DWARF/DwarfGenerator.h
  279   static llvm::Expected<std::unique_ptr<Generator>>
unittests/DebugInfo/GSYM/GSYMTest.cpp
  166   llvm::Expected<FunctionInfo> Decoded = FunctionInfo::decode(Data, BaseAddr);
  210   Expected<uint64_t> ExpectedOffset = FI.encode(FW);
  245   llvm::Expected<uint64_t> ExpectedOffset = FI.encode(FW);
  252   llvm::Expected<FunctionInfo> Decoded = FunctionInfo::decode(Data,
  328   llvm::Expected<InlineInfo> Decoded = InlineInfo::decode(Data, BaseAddr);
  341   llvm::Expected<InlineInfo> Decoded = InlineInfo::decode(Data, BaseAddr);
  809   llvm::Expected<LineTable> Decoded = LineTable::decode(Data, BaseAddr);
  878   llvm::Expected<LineTable> Decoded = LineTable::decode(Data, BaseAddr);
  966   llvm::Expected<Header> Decoded = Header::decode(Data);
 1039   llvm::Expected<Header> Decoded = Header::decode(Data);
 1134   Expected<GsymReader> GR = GsymReader::copyBuffer(OutStrm.str());
unittests/DebugInfo/MSF/MSFBuilderTest.cpp
  309   Expected<MSFBuilder> ExpectedMsf = MSFBuilder::create(
  330   Expected<MSFBuilder> ExpectedMsf =
  348   Expected<MSFBuilder> ExpectedMsf =
  366   Expected<MSFBuilder> ExpectedMsf = MSFBuilder::create(Allocator, 4096);
  375   Expected<uint32_t> SN = Msf.addStream(StreamSize);
unittests/ExecutionEngine/JITLink/JITLinkTestCommon.cpp
   19 Expected<std::unique_ptr<JITLinkTestCommon::TestResources>>
  200 Expected<std::pair<MCInst, size_t>>
  219 Expected<int64_t> JITLinkTestCommon::decodeImmediateOperand(
unittests/ExecutionEngine/JITLink/JITLinkTestCommon.h
   43     static Expected<std::unique_ptr<TestResources>>
  135   Expected<std::unique_ptr<TestResources>>
  143   static Expected<T> readInt(jitlink::LinkGraph &G, jitlink::Block &B,
  153   static Expected<T> readInt(jitlink::LinkGraph &G, StringRef SymbolName,
  163   static Expected<std::pair<MCInst, size_t>>
  166   static Expected<int64_t> decodeImmediateOperand(const MCDisassembler &Dis,
unittests/ExecutionEngine/Orc/CoreAPIsTest.cpp
  248     Expected<SymbolNameSet> tryToGenerate(JITDylib &,
  958     Expected<SymbolNameSet> tryToGenerate(JITDylib &JD,
unittests/ExecutionEngine/Orc/LegacyCompileOnDemandLayerTest.cpp
   20   Expected<JITTargetAddress> getTrampoline() {
unittests/ExecutionEngine/Orc/OrcTestCommon.h
  198     Expected<ModuleHandleT>(ModuleT M,
  215   Expected<ModuleHandleT> addModule(ModuleT M,
unittests/ExecutionEngine/Orc/RPCUtilsTest.cpp
  153   class ExpectedFunc : public Function<ExpectedFunc, Expected<uint32_t>()> {
  374     Error handler(std::function<Error(Expected<int32_t>)> SendResult,
unittests/ExecutionEngine/Orc/RemoteObjectLayerTest.cpp
   32     std::function<Expected<ObjHandleT>(ObjectPtr, SymbolLookupTable&)>;
   42   Expected<ObjHandleT> addObject(ObjectPtr Obj,
unittests/Object/MinidumpTest.cpp
   18 static Expected<std::unique_ptr<MinidumpFile>> create(ArrayRef<uint8_t> Data) {
  350     Expected<ArrayRef<Module>> ExpectedModule = File.getModuleList();
  450     Expected<ArrayRef<Thread>> ExpectedThread = File.getThreadList();
  505     Expected<ArrayRef<MemoryDescriptor>> ExpectedRanges = File.getMemoryList();
  620   Expected<std::unique_ptr<MinidumpFile>> File = create(HeaderTooBig);
  754   Expected<const minidump::ExceptionStream &> ExpectedStream =
unittests/ObjectYAML/MinidumpYAMLTest.cpp
   18 static Expected<std::unique_ptr<object::MinidumpFile>>
  165   Expected<const minidump::ExceptionStream &> ExpectedStream =
  181   Expected<ArrayRef<uint8_t>> ExpectedContext =
  208   Expected<const minidump::ExceptionStream &> ExpectedStream =
  222   Expected<ArrayRef<uint8_t>> ExpectedContext =
  264   Expected<const minidump::ExceptionStream &> ExpectedStream =
  282   Expected<ArrayRef<uint8_t>> ExpectedContext =
  315   Expected<const minidump::ExceptionStream &> ExpectedStream =
  332   Expected<ArrayRef<uint8_t>> ExpectedContext =
unittests/Passes/PluginsTest.cpp
   49   Expected<PassPlugin> Plugin = PassPlugin::Load(PluginPath);
unittests/ProfileData/CoverageMappingTest.cpp
  231   Expected<std::unique_ptr<CoverageMapping>> readOutputFunctions() {
unittests/ProfileData/InstrProfTest.cpp
   96   Expected<InstrProfRecord> R = Reader->getInstrProfRecord("foo", 0x1234);
  212   Expected<InstrProfRecord> R = Reader->getInstrProfRecord("func1", 0x1234);
  253   Expected<InstrProfRecord> R = Reader->getInstrProfRecord("caller", 0x1234);
  284   Expected<InstrProfRecord> R = Reader->getInstrProfRecord("caller", 0x1234);
  393   Expected<InstrProfRecord> R = Reader->getInstrProfRecord("caller", 0x1234);
  443   Expected<InstrProfRecord> R = Reader->getInstrProfRecord("caller", 0x1234);
  520   Expected<InstrProfRecord> R = Reader->getInstrProfRecord("caller", 0x1234);
  607   Expected<InstrProfRecord> ReadRecord1 =
  612   Expected<InstrProfRecord> ReadRecord2 =
  659   Expected<InstrProfRecord> R = Reader->getInstrProfRecord("caller", 0x1234);
unittests/Remarks/BitstreamRemarksParsingTest.cpp
   28   Expected<std::unique_ptr<remarks::RemarkParser>> MaybeParser =
   35   Expected<std::unique_ptr<remarks::Remark>> Remark = Parser.next();
   50   Expected<std::unique_ptr<remarks::RemarkSerializer>> BSSerializer =
   58   Expected<std::unique_ptr<remarks::RemarkParser>> MaybeBSParser =
   65   Expected<std::unique_ptr<remarks::Remark>> BSRemark = BSParser.next();
  159   Expected<std::unique_ptr<remarks::RemarkParser>> MaybeParser =
  165   Expected<std::unique_ptr<remarks::Remark>> MaybeRemark = Parser.next();
  258   Expected<std::unique_ptr<remarks::RemarkSerializer>> BSSerializer =
  326   Expected<std::unique_ptr<remarks::RemarkParser>> MaybeBSParser =
  332   Expected<std::unique_ptr<remarks::Remark>> BSRemark = BSParser.next();
unittests/Remarks/BitstreamRemarksSerializerTest.cpp
   41   Expected<std::unique_ptr<remarks::RemarkSerializer>> MaybeSerializer = [&] {
unittests/Remarks/RemarksStrTabParsingTest.cpp
   18   Expected<StringRef> Nothing = StrTab[0];
   27   Expected<StringRef> Result = StrTab[0];
unittests/Remarks/YAMLRemarksParsingTest.cpp
   17   Expected<std::unique_ptr<remarks::RemarkParser>> MaybeParser =
   23   Expected<std::unique_ptr<remarks::Remark>> Remark = Parser.next();
   33   Expected<std::unique_ptr<remarks::RemarkParser>> MaybeParser =
   39   Expected<std::unique_ptr<remarks::Remark>> Remark = Parser.next();
   50   Expected<std::unique_ptr<remarks::RemarkParser>> MaybeParser =
   56   Expected<std::unique_ptr<remarks::Remark>> Remark = Parser.next();
   76   Expected<std::unique_ptr<remarks::RemarkParser>> MaybeParser =
  401   Expected<std::unique_ptr<remarks::RemarkParser>> MaybeParser =
  407   Expected<std::unique_ptr<remarks::Remark>> MaybeRemark = Parser.next();
  572   Expected<std::unique_ptr<remarks::RemarkParser>> MaybeParser =
  579   Expected<std::unique_ptr<remarks::Remark>> MaybeRemark = Parser.next();
  648   Expected<std::unique_ptr<remarks::RemarkParser>> MaybeParser =
  655   Expected<std::unique_ptr<remarks::Remark>> MaybeRemark = Parser.next();
unittests/Remarks/YAMLRemarksSerializerTest.cpp
   31   Expected<std::unique_ptr<remarks::RemarkSerializer>> MaybeS = [&] {
unittests/Support/ErrorTest.cpp
  536   Expected<int> A = 7;
  545   Expected<int&> B = A;
  587   Expected<int> A = make_error<CustomError>(42);
  599   Expected<int> A = make_error<CustomError>(42);
  622   Expected<B *> A1(Expected<D *>(nullptr));
  629   Expected<std::unique_ptr<B>> A2(Expected<std::unique_ptr<D>>(nullptr));
  650 static Expected<int> foo(FooStrategy S) {
unittests/Support/FileCheckTest.cpp
   23   Expected<uint64_t> Value = Ten.eval();
   69   Expected<uint64_t> EvalResult = FooVarUse.eval();
  104   Expected<uint64_t> Value = Binop.eval();
  147   Expected<FileCheckPattern::VariableProperties> ParsedVarResult =
  410   Expected<std::string> SubstValue = StringSubstitution.getResult();
  516   Expected<StringRef> LocalVar = Cxt.getPatternVarValue(LocalVarStr);
  519   Expected<std::unique_ptr<FileCheckExpressionAST>> ExpressionAST =
  525   Expected<StringRef> EmptyVar = Cxt.getPatternVarValue(EmptyVarStr);
  526   Expected<StringRef> UnknownVar = Cxt.getPatternVarValue(UnknownVarStr);
  528   Expected<uint64_t> ExpressionVal = (*ExpressionAST)->eval();
  577   Expected<StringRef> GlobalVar = Cxt.getPatternVarValue(GlobalVarStr);
unittests/Support/FileOutputBufferTest.cpp
   45     Expected<std::unique_ptr<FileOutputBuffer>> BufferOrErr =
   67     Expected<std::unique_ptr<FileOutputBuffer>> Buffer2OrErr =
   84     Expected<std::unique_ptr<FileOutputBuffer>> BufferOrErr =
  105     Expected<std::unique_ptr<FileOutputBuffer>> BufferOrErr =
unittests/Support/GlobPatternTest.cpp
   18   Expected<GlobPattern> Pat1 = GlobPattern::create("");
   25   Expected<GlobPattern> Pat1 = GlobPattern::create("ab*c*def");
   35   Expected<GlobPattern> Pat1 = GlobPattern::create("a??c");
   43   Expected<GlobPattern> Pat1 = GlobPattern::create("\\*");
   49   Expected<GlobPattern> Pat2 = GlobPattern::create("a?\\?c");
   57   Expected<GlobPattern> Pat1 = GlobPattern::create("[abc-fy-z]");
   72   Expected<GlobPattern> Pat1 = GlobPattern::create("[^abc-fy-z]");
   85   Expected<GlobPattern> Pat2 = GlobPattern::create("[!abc-fy-z]");
  100   Expected<GlobPattern> Pat1 = GlobPattern::create("[]a]x");
  109   Expected<GlobPattern> Pat1 = GlobPattern::create("[*?^]");
  119   Expected<GlobPattern> Pat1 = GlobPattern::create("[");
  123   Expected<GlobPattern> Pat2 = GlobPattern::create("[]");
  129   Expected<GlobPattern> Pat1 = GlobPattern::create("a*\xFF");
  132   Expected<GlobPattern> Pat2 = GlobPattern::create("[\xFF-\xFF]");
unittests/Support/JSONTest.cpp
  222   llvm::Expected<Value> Doc = parse(R"(
  318     llvm::Expected<Value> Doc = parse(T.Str);
unittests/Support/MemoryBufferTest.cpp
  110     Expected<sys::fs::file_t> File = sys::fs::openNativeFileForRead(TestPath);
  119     Expected<sys::fs::file_t> File = sys::fs::openNativeFileForWrite(
unittests/Support/Path.cpp
  705     Expected<fs::TempFile> T = fs::TempFile::create(Model);
 1523     Expected<fs::file_t> FD = fs::openNativeFileForRead(NonExistantFile);
 1527     if (Expected<size_t> BytesRead = fs::readNativeFile(
 1541   Expected<fs::file_t> FD = fs::openNativeFileForRead(NonExistantFile);
 1547     if (Expected<size_t> BytesRead = fs::readNativeFileSlice(
unittests/Support/TarWriterTest.cpp
   48   Expected<std::unique_ptr<TarWriter>> TarOrErr = TarWriter::create(Path, Base);
  129   Expected<std::unique_ptr<TarWriter>> TarOrErr = TarWriter::create(Path, "");
  147   Expected<std::unique_ptr<TarWriter>> TarOrErr = TarWriter::create(Path, "");
  166   Expected<std::unique_ptr<TarWriter>> TarOrErr = TarWriter::create(Path, "");
unittests/TextAPI/ELFYAMLTest.cpp
   44   Expected<std::unique_ptr<ELFStub>> StubOrErr = readTBEFromBuffer(Data);
   69   Expected<std::unique_ptr<ELFStub>> StubOrErr = readTBEFromBuffer(Data);
  128   Expected<std::unique_ptr<ELFStub>> StubOrErr = readTBEFromBuffer(Data);
  143   Expected<std::unique_ptr<ELFStub>> StubOrErr = readTBEFromBuffer(Data);
unittests/tools/llvm-exegesis/X86/SnippetFileTest.cpp
   39   Expected<std::vector<BenchmarkCode>> TestCommon(StringRef Contents) {
unittests/tools/llvm-exegesis/X86/SnippetGeneratorTest.cpp
  346   Expected<std::vector<CodeTemplate>>
usr/include/c++/7.4.0/tuple
 1313     constexpr __tuple_element_t<__i, tuple<_Elements...>>&
 1319     constexpr const __tuple_element_t<__i, tuple<_Elements...>>&
 1325     constexpr __tuple_element_t<__i, tuple<_Elements...>>&&
utils/TableGen/GlobalISelEmitter.cpp
 3276   Expected<InstructionMatcher &>
 3287   Expected<BuildMIAction &> createAndImportInstructionRenderer(
 3290   Expected<action_iterator> createAndImportSubInstructionRenderer(
 3293   Expected<action_iterator>
 3298   Expected<action_iterator>
 3302   Expected<action_iterator>
 3324   Expected<RuleMatcher> runOnPattern(const PatternToMatch &P);
 3464 Expected<InstructionMatcher &> GlobalISelEmitter::createAndImportSelDAGMatcher(
 3929 Expected<action_iterator> GlobalISelEmitter::importExplicitUseRenderer(
 4074 Expected<BuildMIAction &> GlobalISelEmitter::createAndImportInstructionRenderer(
 4104 Expected<action_iterator>
 4203 Expected<action_iterator> GlobalISelEmitter::createInstructionRenderer(
 4233 Expected<action_iterator> GlobalISelEmitter::importExplicitUseRenderers(
 4526 Expected<RuleMatcher> GlobalISelEmitter::runOnPattern(const PatternToMatch &P) {