LLVM 20.0.0git
Public Types | Public Member Functions | Friends | List of all members
llvm::Expected< T > Class Template Reference

Tagged union holding either a T or a Error. More...

#include "llvm/Support/Error.h"

Inheritance diagram for llvm::Expected< T >:
Inheritance graph
[legend]

Public Types

using storage_type = std::conditional_t< isRef, wrap, T >
 
using value_type = T
 

Public Member Functions

 Expected (Error &&Err)
 Create an Expected<T> error value from the given Error.
 
 Expected (ErrorSuccess)=delete
 Forbid to convert from Error::success() implicitly, this avoids having Expected<T> foo() { return Error::success(); } which compiles otherwise but triggers the assertion above.
 
template<typename OtherT >
 Expected (OtherT &&Val, std::enable_if_t< std::is_convertible_v< OtherT, T > > *=nullptr)
 Create an Expected<T> success value from the given OtherT value, which must be convertible to T.
 
 Expected (Expected &&Other)
 Move construct an Expected<T> value.
 
template<class OtherT >
 Expected (Expected< OtherT > &&Other, std::enable_if_t< std::is_convertible_v< OtherT, T > > *=nullptr)
 Move construct an Expected<T> value from an Expected<OtherT>, where OtherT must be convertible to T.
 
template<class OtherT >
 Expected (Expected< OtherT > &&Other, std::enable_if_t<!std::is_convertible_v< OtherT, T > > *=nullptr)
 Move construct an Expected<T> value from an Expected<OtherT>, where OtherT isn't convertible to T.
 
Expectedoperator= (Expected &&Other)
 Move-assign from another Expected<T>.
 
 ~Expected ()
 Destroy an Expected<T>.
 
 operator bool ()
 Return false if there is an error.
 
reference get ()
 Returns a reference to the stored T value.
 
const_reference get () const
 Returns a const reference to the stored T value.
 
template<class OtherT >
Error moveInto (OtherT &Value, std::enable_if_t< std::is_assignable_v< OtherT &, T && > > *=nullptr) &&
 Returns takeError() after moving the held T (if any) into V.
 
template<typename ErrT >
bool errorIsA () const
 Check that this Expected<T> is an error of type ErrT.
 
Error takeError ()
 Take ownership of the stored error.
 
pointer operator-> ()
 Returns a pointer to the stored T value.
 
const_pointer operator-> () const
 Returns a const pointer to the stored T value.
 
reference operator* ()
 Returns a reference to the stored T value.
 
const_reference operator* () const
 Returns a const reference to the stored T value.
 

Friends

template<class T1 >
class ExpectedAsOutParameter
 
template<class OtherT >
class Expected
 

Detailed Description

template<class T>
class llvm::Expected< T >

Tagged union holding either a T or a Error.

This class parallels ErrorOr, but replaces error_code with Error. Since Error cannot be copied, this class replaces getError() with takeError(). It also adds an bool errorIsA<ErrT>() method for testing the error class type.

Example usage of 'Expected<T>' as a function return type:

Expected<int> myDivide(int A, int B) {
if (B == 0) {
// return an Error
"B must not be zero!");
}
// return an integer
return A / B;
}
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
Tagged union holding either a T or a Error.
Definition: Error.h:481
std::error_code inconvertibleErrorCode()
The value returned by this function can be returned from convertToErrorCode for Error values where no...
Definition: Error.cpp:98
Error createStringError(std::error_code EC, char const *Fmt, const Ts &... Vals)
Create formatted StringError object.
Definition: Error.h:1291

Checking the results of to a function returning 'Expected<T>':

if (auto E = Result.takeError()) {
// We must consume the error. Typically one of:
// - return the error to our caller
// - toString(), when logging
// - consumeError(), to silently swallow the error
// - handleErrors(), to distinguish error types
errs() << "Problem with division " << toString(std::move(E)) << "\n";
return;
}
// use the result
outs() << "The answer is " << *Result << "\n";
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
raw_fd_ostream & outs()
This returns a reference to a raw_fd_ostream for standard output.
raw_fd_ostream & errs()
This returns a reference to a raw_ostream for standard error.
const char * toString(DWARFSectionKind Kind)

For unit-testing a function returning an 'Expected<T>', see the 'EXPECT_THAT_EXPECTED' macros in llvm/Testing/Support/Error.h

Definition at line 481 of file Error.h.

Member Typedef Documentation

◆ storage_type

template<class T >
using llvm::Expected< T >::storage_type = std::conditional_t<isRef, wrap, T>

Definition at line 492 of file Error.h.

◆ value_type

template<class T >
using llvm::Expected< T >::value_type = T

Definition at line 493 of file Error.h.

Constructor & Destructor Documentation

◆ Expected() [1/6]

template<class T >
llvm::Expected< T >::Expected ( Error &&  Err)
inline

Create an Expected<T> error value from the given Error.

Definition at line 503 of file Error.h.

References assert().

◆ Expected() [2/6]

template<class T >
llvm::Expected< T >::Expected ( ErrorSuccess  )
delete

Forbid to convert from Error::success() implicitly, this avoids having Expected<T> foo() { return Error::success(); } which compiles otherwise but triggers the assertion above.

◆ Expected() [3/6]

template<class T >
template<typename OtherT >
llvm::Expected< T >::Expected ( OtherT &&  Val,
std::enable_if_t< std::is_convertible_v< OtherT, T > > *  = nullptr 
)
inline

Create an Expected<T> success value from the given OtherT value, which must be convertible to T.

Definition at line 522 of file Error.h.

◆ Expected() [4/6]

template<class T >
llvm::Expected< T >::Expected ( Expected< T > &&  Other)
inline

Move construct an Expected<T> value.

Definition at line 535 of file Error.h.

References Other.

◆ Expected() [5/6]

template<class T >
template<class OtherT >
llvm::Expected< T >::Expected ( Expected< OtherT > &&  Other,
std::enable_if_t< std::is_convertible_v< OtherT, T > > *  = nullptr 
)
inline

Move construct an Expected<T> value from an Expected<OtherT>, where OtherT must be convertible to T.

Definition at line 540 of file Error.h.

References Other.

◆ Expected() [6/6]

template<class T >
template<class OtherT >
llvm::Expected< T >::Expected ( Expected< OtherT > &&  Other,
std::enable_if_t<!std::is_convertible_v< OtherT, T > > *  = nullptr 
)
inlineexplicit

Move construct an Expected<T> value from an Expected<OtherT>, where OtherT isn't convertible to T.

Definition at line 548 of file Error.h.

References Other.

◆ ~Expected()

template<class T >
llvm::Expected< T >::~Expected ( )
inline

Destroy an Expected<T>.

Definition at line 561 of file Error.h.

Member Function Documentation

◆ errorIsA()

template<class T >
template<typename ErrT >
bool llvm::Expected< T >::errorIsA ( ) const
inline

Check that this Expected<T> is an error of type ErrT.

Definition at line 600 of file Error.h.

◆ get() [1/2]

template<class T >
reference llvm::Expected< T >::get ( )
inline

Returns a reference to the stored T value.

Definition at line 578 of file Error.h.

Referenced by llvm::BitstreamCursor::advance(), llvm::BitstreamCursor::advanceSkippingSubblocks(), llvm::BitcodeAnalyzer::analyze(), llvm::object::Archive::Archive(), llvm::object::ArchiveMemberHeader::ArchiveMemberHeader(), llvm::object::Archive::Child::Child(), llvm::gsym::ObjectFileTransformer::convert(), llvm::object::Slice::create(), llvm::coverage::BinaryCoverageReader::create(), llvm::object::createBinary(), llvm::pdb::NativeSession::createFromExe(), llvm::objcopy::createNewArchiveMembers(), llvm::object::ObjectFile::createObjectFile(), llvm::object::SymbolicFile::createSymbolicFile(), decode(), doList(), llvm::DWARFLocationTable::dumpLocationList(), llvm::BitstreamCursor::EnterSubBlock(), llvm::objcopy::coff::executeObjcopyOnBinary(), llvm::objcopy::wasm::executeObjcopyOnBinary(), llvm::objcopy::xcoff::executeObjcopyOnBinary(), llvm::object::extractOffloadBinaries(), llvm::object::IRObjectFile::findBitcodeInMemBuffer(), llvm::pdb::NativeInlineSiteSymbol::findInlineeLinesByVA(), llvm::MCJIT::findSymbol(), llvm::dwarf_linker::finiteLoop(), llvm::MCJIT::generateCodeForModule(), llvm::object::Archive::Child::getAsBinary(), llvm::getBitcodeFileContents(), llvm::object::Archive::Child::getBuffer(), llvm::object::XCOFFObjectFile::getCommonSymbolSizeImpl(), getDbiStreamPtr(), llvm::object::ELFFile< ELFT >::getDynSymtabSize(), getEnableSplitLTOUnitAndUnifiedFlag(), llvm::object::XCOFFObjectFile::getImportFileTable(), llvm::getLazyIRModule(), llvm::object::Archive::Child::getMemoryBufferRef(), llvm::object::Archive::Child::getName(), llvm::object::ArchiveMemberHeader::getName(), llvm::object::Archive::Child::getNext(), llvm::object::ArchiveMemberHeader::getNextChildLoc(), llvm::object::BigArchiveMemberHeader::getNextChildLoc(), llvm::NewArchiveMember::getOldMember(), llvm::object::BigArchiveMemberHeader::getRawName(), llvm::object::WasmObjectFile::getSymbolAddress(), llvm::object::XCOFFObjectFile::getSymbolAlignment(), llvm::object::XCOFFObjectFile::getSymbolFlags(), llvm::object::XCOFFObjectFile::getSymbolSection(), llvm::object::XCOFFObjectFile::getSymbolSectionName(), llvm::object::XCOFFObjectFile::getSymbolSize(), llvm::object::XCOFFObjectFile::getSymbolType(), llvm::BitcodeReaderValueList::getValueFwdRef(), hasObjCCategoryInModule(), llvm::object::COFFObjectFile::isDebugSection(), llvm::object::ELFObjectFile< ELFT >::isDebugSection(), llvm::object::MachOObjectFile::isDebugSection(), llvm::object::XCOFFSymbolRef::isFunction(), llvm::object::ArchiveMemberHeader::isThin(), jumpToValueSymbolTable(), LLVMCreateBinary(), LLVMCreateObjectFile(), LLVMGetBitcodeModuleInContext(), LLVMMachOUniversalBinaryCopyObjectForArch(), LLVMParseBitcodeInContext(), llvm::pdb::loadDataForEXE(), loadModuleFromInput(), llvm::BTFParser::ParseContext::makeExtractor(), llvm::cgdata::mergeCodeGenData(), parseInlineInfo(), llvm::parseIR(), llvm::MetadataLoader::MetadataLoaderImpl::parseMetadata(), llvm::MetadataLoader::MetadataLoaderImpl::parseMetadataAttachment(), llvm::MetadataLoader::MetadataLoaderImpl::parseMetadataKinds(), llvm::BitstreamCursor::ReadAbbrevRecord(), readBlobInRecord(), llvm::BitstreamCursor::ReadBlockInfoBlock(), readCoverageMappingData(), llvm::ifs::readELFFile(), llvm::msgpack::Document::readFromBlob(), readIdentificationBlock(), readModuleTriple(), llvm::BitstreamCursor::readRecord(), readTriple(), llvm::InstrProfLookupTrait::readValueProfilingData(), llvm::SimpleBitstreamCursor::ReadVBR(), llvm::SimpleBitstreamCursor::ReadVBR64(), searchForExe(), llvm::pdb::NativeSession::searchForPdb(), llvm::BitstreamCursor::SkipBlock(), llvm::BitstreamCursor::skipRecord(), llvm::SPIRVTranslateModule(), splitCodeGen(), and upgrade().

◆ get() [2/2]

template<class T >
const_reference llvm::Expected< T >::get ( ) const
inline

Returns a const reference to the stored T value.

Definition at line 584 of file Error.h.

References llvm::get().

◆ moveInto()

template<class T >
template<class OtherT >
Error llvm::Expected< T >::moveInto ( OtherT &  Value,
std::enable_if_t< std::is_assignable_v< OtherT &, T && > > *  = nullptr 
) &&
inline

Returns takeError() after moving the held T (if any) into V.

Definition at line 591 of file Error.h.

References llvm::get().

◆ operator bool()

template<class T >
llvm::Expected< T >::operator bool ( )
inlineexplicit

Return false if there is an error.

Definition at line 570 of file Error.h.

References Unchecked.

◆ operator*() [1/2]

template<class T >
reference llvm::Expected< T >::operator* ( )
inline

Returns a reference to the stored T value.

Definition at line 628 of file Error.h.

◆ operator*() [2/2]

template<class T >
const_reference llvm::Expected< T >::operator* ( ) const
inline

Returns a const reference to the stored T value.

Definition at line 634 of file Error.h.

◆ operator->() [1/2]

template<class T >
pointer llvm::Expected< T >::operator-> ( )
inline

Returns a pointer to the stored T value.

Definition at line 616 of file Error.h.

◆ operator->() [2/2]

template<class T >
const_pointer llvm::Expected< T >::operator-> ( ) const
inline

Returns a const pointer to the stored T value.

Definition at line 622 of file Error.h.

◆ operator=()

template<class T >
Expected & llvm::Expected< T >::operator= ( Expected< T > &&  Other)
inline

Move-assign from another Expected<T>.

Definition at line 555 of file Error.h.

References Other.

Referenced by llvm::MSVCPExpected< T >::operator=().

◆ takeError()

template<class T >
Error llvm::Expected< T >::takeError ( )
inline

Take ownership of the stored error.

After calling this the Expected<T> is in an indeterminate state that can only be safely destructed. No further calls (beside the destructor) should be made on the Expected<T> value.

Definition at line 608 of file Error.h.

References Unchecked.

Referenced by accumulateLocs(), llvm::CodeGenTargetMachineImpl::addAsmPrinter(), llvm::objcopy::coff::addGnuDebugLink(), llvm::objcopy::NameMatcher::addMatcher(), llvm::pdb::PDBFileBuilder::addNamedStream(), llvm::BitstreamCursor::advance(), advanceToMetaBlock(), llvm::BitcodeAnalyzer::analyze(), llvm::object::ELFFile< ELFT >::android_relas(), appendFile(), llvm::object::Archive::Archive(), llvm::object::ArchiveMemberHeader::ArchiveMemberHeader(), llvm::lto::backend(), llvm::object::BindRebaseSegInfo::BindRebaseSegInfo(), llvm::objcopy::elf::ELFBuilder< ELFT >::build(), llvm::ifs::buildStub(), llvm::object::Archive::Child::Child(), codegen(), llvm::pdb::PDBFileBuilder::commit(), computeMemberData(), llvm::RuntimeDyldImpl::computeSectionStubBufSize(), llvm::object::computeSymbolSizes(), llvm::RuntimeDyldImpl::computeTotalAllocSize(), llvm::object::SectionRef::containsSymbol(), llvm::gsym::ObjectFileTransformer::convert(), llvm::object::Slice::create(), llvm::MinidumpYAML::Stream::create(), llvm::symbolize::SymbolizableObjectFile::create(), llvm::lto::InputFile::create(), llvm::object::IRObjectFile::create(), llvm::coverage::BinaryCoverageReader::create(), llvm::object::MinidumpFile::create(), llvm::InstrProfSymtab::create(), llvm::objcopy::NameOrPattern::create(), llvm::OpenMPIRBuilder::createAtomicCapture(), llvm::object::createBinary(), llvm::OpenMPIRBuilder::createCancel(), llvm::raw_socket_stream::createConnectedUnix(), llvm::pdb::NativeSession::createFromExe(), llvm::LTOModule::createInputFile(), llvm::mca::InstrBuilder::createInstruction(), llvm::logicalview::LVBinaryReader::createInstructions(), llvm::jitlink::createLinkGraphFromELFObject(), createMemberHeaderParseError(), llvm::objcopy::createNewArchiveMembers(), llvm::object::ObjectFile::createObjectFile(), createOnDiskBuffer(), createOutlinedFunction(), llvm::OpenMPIRBuilder::createParallel(), llvm::OpenMPIRBuilder::createReductions(), llvm::OpenMPIRBuilder::createReductionsGPU(), llvm::OpenMPIRBuilder::createSections(), llvm::OpenMPIRBuilder::createSingle(), llvm::object::SymbolicFile::createSymbolicFile(), llvm::OpenMPIRBuilder::createTargetData(), llvm::ListeningSocket::createUnix(), llvm::remarks::createYAMLParserFromMeta(), llvm::object::ELFFile< ELFT >::crels(), llvm::gsym::CallSiteInfoCollection::decode(), decode(), llvm::gsym::MergedFunctionsInfo::decode(), decodeBBAddrMapImpl(), llvm::objcopy::deepWriteArchive(), llvm::FileCheckPatternContext::defineCmdlineVariables(), llvm::NewArchiveMember::detectKindFromObject(), doImportingForModuleForTest(), doList(), llvm::DWARFLocationTable::dumpLocationList(), llvm::DWARFDebugNames::Entry::dumpParentIdx(), dumpSectionToFile(), llvm::objcopy::wasm::dumpSectionToFile(), llvm::object::ELFFile< ELFT >::dynamicEntries(), llvm::orc::RTDyldObjectLinkingLayer::emit(), llvm::DWARFYAML::emitDebugNames(), llvm::OpenMPIRBuilder::emitKernelLaunch(), llvm::RuntimeDyldImpl::emitSection(), llvm::OpenMPIRBuilder::emitTargetRegionFunction(), llvm::gsym::MergedFunctionsInfo::encode(), llvm::BitstreamCursor::EnterSubBlock(), llvm::BinaryOperation::eval(), llvm::objcopy::executeObjcopyOnArchive(), llvm::objcopy::coff::executeObjcopyOnBinary(), llvm::objcopy::elf::executeObjcopyOnBinary(), llvm::objcopy::wasm::executeObjcopyOnBinary(), llvm::objcopy::xcoff::executeObjcopyOnBinary(), llvm::objcopy::elf::executeObjcopyOnIHex(), llvm::objcopy::macho::executeObjcopyOnMachOUniversalBinary(), llvm::objcopy::elf::executeObjcopyOnRawBinary(), llvm::expectedToErrorOrAndEmitErrors(), llvm::DWARFAbbreviationDeclarationSet::extract(), llvm::object::extractOffloadBinaries(), extractSections(), llvm::DebuginfodFetcher::fetch(), llvm::ifs::filterIFSSyms(), llvm::objcopy::elf::ASCIIHexWriter::finalize(), llvm::orc::DebugObject::finalizeAsync(), llvm::RuntimeDyldCOFFX86_64::finalizeLoad(), llvm::RuntimeDyldELF::finalizeLoad(), llvm::DebuginfodCollection::findBinaryPath(), llvm::object::IRObjectFile::findBitcodeInMemBuffer(), llvm::object::IRObjectFile::findBitcodeInObject(), llvm::DebuginfodCollection::findDebugBinaryPath(), llvm::pdb::TpiStream::findFullDeclForForwardRef(), llvm::pdb::NativeInlineSiteSymbol::findInlineeLinesByVA(), llvm::pdb::NativeFunctionSymbol::findInlineFramesByVA(), llvm::pdb::SymbolCache::findLineNumbersByVA(), llvm::MCJIT::findSymbol(), llvm::pdb::SymbolCache::findSymbolByTypeIndex(), llvm::lto::findThinLTOModule(), llvm::dwarf_linker::finiteLoop(), llvm::JITSymbolFlags::fromObjectSymbol(), llvm::ARMJITSymbolFlags::fromObjectSymbol(), llvm::DWARFDebugAranges::generate(), llvm::MCJIT::generateCodeForModule(), llvm::DWARFUnit::getAbbreviations(), llvm::object::AbstractArchiveMemberHeader::getAccessMode(), llvm::offloading::amdgpu::getAMDGPUMetaDataFromImage(), llvm::object::Archive::Child::getAsBinary(), llvm::DWARFFormValue::getAsCString(), llvm::object::COFFObjectFile::getAuxSymbol(), llvm::getBitcodeFileContents(), getBitcodeFileMachine(), llvm::getBitcodeLTOInfo(), llvm::getBitcodeProducerString(), llvm::getBitcodeTargetTriple(), llvm::object::Archive::Child::getBuffer(), llvm::getCachedOrDownloadArtifact(), llvm::orc::getCOFFObjectFileSymbolInfo(), llvm::object::ObjectFile::getCommonSymbolSize(), llvm::object::XCOFFObjectFile::getCommonSymbolSizeImpl(), llvm::object::SectionRef::getContents(), llvm::object::ResourceSectionRef::getContents(), getCUIdentifiers(), getDbiStreamPtr(), llvm::dwarf_linker::parallel::CompileUnit::getDirAndFilenameFromLineTable(), llvm::object::ELFFile< ELFT >::getDynSymtabSize(), llvm::object::getELFAddend(), llvm::orc::getELFObjectFileSymbolInfo(), getEnableSplitLTOUnitAndUnifiedFlag(), llvm::object::ELFFile< ELFT >::getEntry(), llvm::object::XCOFFObjectFile::getExceptionEntries(), llvm::object::getExtendedSymbolTableIndex(), llvm::MemoryBuffer::getFileAsStream(), getFileAux(), llvm::object::Archive::Child::getFullName(), llvm::gsym::GsymReader::getFunctionInfoDataForAddress(), llvm::orc::getGenericObjectFileSymbolInfo(), llvm::BinaryOperation::getImplicitFormat(), llvm::object::XCOFFObjectFile::getImportFileTable(), llvm::object::AbstractArchiveMemberHeader::getLastModified(), llvm::getLazyBitcodeModule(), llvm::getLazyIRModule(), llvm::DWARFContext::getLineTableForUnit(), llvm::object::ELFFile< ELFT >::getLinkAsStrtab(), llvm::orc::getMachOObjectFileSymbolInfo(), llvm::object::MinidumpFile::getMemory64List(), llvm::object::Archive::Child::getMemoryBufferRef(), llvm::pdb::getModuleDebugStream(), llvm::getModuleSummaryIndex(), llvm::object::Archive::Child::getName(), llvm::object::ArchiveMemberHeader::getName(), llvm::object::Archive::Child::getNext(), llvm::object::ArchiveMemberHeader::getNextChildLoc(), llvm::object::BigArchiveMemberHeader::getNextChildLoc(), llvm::getOffset(), llvm::NewArchiveMember::getOldMember(), getOpenFileImpl(), getPdbPathFromExe(), llvm::object::ELFObjectFileBase::getPltEntries(), llvm::LTOModule::getProducerString(), llvm::object::BigArchiveMemberHeader::getRawName(), getReadWriteFile(), llvm::object::ELFObjectFile< ELFT >::getRelocatedSection(), llvm::remarks::getRemarksSectionContents(), llvm::StringSubstitution::getResult(), llvm::NumericSubstitution::getResult(), llvm::object::ELFFile< ELFT >::getSectionAndRelocations(), llvm::object::ELFFile< ELFT >::getSectionIndex(), llvm::objcopy::elf::SectionTableRef::getSectionOfType(), getSingleModule(), llvm::object::BigArchiveMemberHeader::getSize(), llvm::object::ELFFile< ELFT >::getStringTableForSymtab(), llvm::object::ELFObjectFile< ELFT >::getSymbolAddress(), llvm::object::WasmObjectFile::getSymbolAddress(), llvm::object::ELFObjectFile< ELFT >::getSymbolAlignment(), llvm::object::XCOFFObjectFile::getSymbolAlignment(), llvm::object::ELFObjectFile< ELFT >::getSymbolBinding(), llvm::object::ELFObjectFile< ELFT >::getSymbolELFType(), llvm::object::ELFObjectFile< ELFT >::getSymbolFlags(), llvm::object::XCOFFObjectFile::getSymbolFlags(), getSymbolInfo(), llvm::object::ELFObjectFile< ELFT >::getSymbolName(), llvm::object::ELFObjectFile< ELFT >::getSymbolOther(), llvm::object::ELFObjectFile< ELFT >::getSymbolSection(), llvm::object::COFFObjectFile::getSymbolSection(), llvm::object::XCOFFObjectFile::getSymbolSection(), llvm::object::XCOFFObjectFile::getSymbolSectionName(), llvm::object::XCOFFObjectFile::getSymbolSize(), llvm::object::ELFObjectFile< ELFT >::getSymbolType(), llvm::object::MachOObjectFile::getSymbolType(), llvm::object::XCOFFObjectFile::getSymbolType(), llvm::object::ELFObjectFile< ELFT >::getSymbolValueImpl(), getUUID(), llvm::BitcodeReaderValueList::getValueFwdRef(), llvm::object::ELFFile< ELFT >::getVersionDefinitions(), llvm::object::ELFFile< ELFT >::getVersionDependencies(), llvm::object::XCOFFSymbolRef::getXCOFFCsectAuxRef(), llvm::jitlink::COFFLinkGraphBuilder::graphifySections(), llvm::jitlink::COFFLinkGraphBuilder::graphifySymbols(), handleCompressedSection(), llvm::handleSection(), hasObjCCategoryInModule(), llvm::pdb::PDBFile::hasPDBInjectedSourceStream(), llvm::pdb::PDBFile::hasPDBStringTable(), llvm::FunctionImporter::importFunctions(), llvm::objcopy::elf::Section::initialize(), llvm::objcopy::elf::SectionIndexSection::initialize(), llvm::objcopy::elf::SymbolTableSection::initialize(), llvm::objcopy::elf::RelocSectionWithSymtabBase< SymTabType >::initialize(), initRelocations(), isArchiveSymbol(), llvm::isBitcodeContainingObjCCategory(), llvm::LTOModule::isBitcodeFile(), llvm::LTOModule::isBitcodeForTarget(), isBlock(), isCodeViewDebugSubsection(), llvm::object::COFFObjectFile::isDebugSection(), llvm::object::ELFObjectFile< ELFT >::isDebugSection(), llvm::object::MachOObjectFile::isDebugSection(), llvm::object::XCOFFSymbolRef::isFunction(), llvm::object::ObjectFile::isSectionBitcode(), llvm::object::ArchiveMemberHeader::isThin(), llvm::isThumbFunc(), isVariableIndexable(), jumpToValueSymbolTable(), llvm::libDriverMain(), llvm::remarks::RemarkLinker::link(), llvm::jitlink::JITLinkerBase::linkPhase2(), llvm::jitlink::JITLinkerBase::linkPhase3(), llvm::jitlink::JITLinkerBase::linkPhase4(), LLVMCreateBinary(), LLVMCreateObjectFile(), LLVMGetBitcodeModuleInContext(), LLVMMachOUniversalBinaryCopyObjectForArch(), LLVMMoveToContainingSection(), LLVMParseBitcodeInContext(), LLVMRemarkParserGetNext(), llvm::object::ResourceSectionRef::load(), llvm::pdb::loadDataForEXE(), llvm::xray::loadInstrumentationMap(), llvm::orc::loadLinkableFile(), llvm::orc::loadMachORelocatableObject(), loadModuleFromInput(), loadObj(), llvm::RuntimeDyldImpl::loadObjectImpl(), llvm::xray::loadProfile(), llvm::xray::loadTraceFile(), llvm::object::ELFFile< ELFT >::loadVersionMap(), llvm::localCache(), lookupSections(), llvm::BTFParser::ParseContext::makeExtractor(), llvm::logicalview::LVBinaryReader::mapVirtualAddress(), llvm::cgdata::mergeCodeGenData(), llvm::CodeGenDataReader::mergeFromObjectFile(), llvm::MSVCPExpected< T >::MSVCPExpected(), llvm::remarks::YAMLRemarkParser::next(), llvm::orc::DebugObjectManagerPlugin::notifyEmitted(), llvm::pdb::InputFile::open(), llvm::BTFParser::parse(), llvm::remarks::YAMLRemarkParser::parseArg(), llvm::parseBitcodeFile(), parseBitcodeFileImpl(), parseBlock(), llvm::remarks::BitstreamParserHelper::parseBlockInfoBlock(), llvm::remarks::YAMLRemarkParser::parseDebugLoc(), llvm::parseIR(), llvm::MetadataLoader::MetadataLoaderImpl::parseMetadata(), llvm::MetadataLoader::MetadataLoaderImpl::parseMetadataAttachment(), llvm::MetadataLoader::MetadataLoaderImpl::parseMetadataKinds(), llvm::Pattern::parseNumericSubstitutionBlock(), llvm::Pattern::parsePattern(), parseRecord(), llvm::remarks::YAMLRemarkParser::parseRemark(), parseV5DirFileTables(), llvm::ifs::populateSymbols(), llvm::Pattern::printSubstitutions(), llvm::RuntimeDyldCOFFAArch64::processRelocationRef(), llvm::RuntimeDyldCOFFI386::processRelocationRef(), llvm::RuntimeDyldCOFFThumb::processRelocationRef(), llvm::RuntimeDyldCOFFX86_64::processRelocationRef(), llvm::RuntimeDyldELF::processRelocationRef(), llvm::BitstreamCursor::ReadAbbrevRecord(), readBBAddrMapImpl(), readBlobInRecord(), llvm::BitstreamCursor::ReadBlockInfoBlock(), readCoverageMappingData(), readDynsymVersionsImpl(), llvm::ifs::readELFFile(), llvm::msgpack::Document::readFromBlob(), readIdentificationBlock(), llvm::object::readIRSymtab(), llvm::readModuleSummaryIndex(), readModuleTriple(), llvm::sys::fs::readNativeFileToEOF(), llvm::BitstreamCursor::readRecord(), readTriple(), llvm::InstrProfLookupTrait::readValueProfilingData(), llvm::objcopy::coff::Object::removeSymbols(), llvm::pdb::PDBFile::safelyCreateNamedStream(), llvm::cgdata::saveModuleForTwoRounds(), searchForExe(), llvm::pdb::NativeSession::searchForPdb(), llvm::remarks::RemarkLinker::serialize(), setSectionFlagsAndType(), llvm::dwarf_linker::parallel::SectionDescriptor::setSizesForSectionCreatedByAsmPrinter(), llvm::setupLLVMOptimizationRemarks(), llvm::BitstreamCursor::SkipBlock(), llvm::BitstreamCursor::skipRecord(), llvm::SPIRVTranslateModule(), llvm::streamFile(), llvm::lto::thinBackend(), updateSection(), upgrade(), llvm::DWARFLocationTable::visitAbsoluteLocationList(), llvm::write(), llvm::writeArchive(), llvm::writeArchiveToStream(), writeDIE(), writeDWARFLists(), llvm::ifs::writeELFBinaryToFile(), llvm::object::writeImportLibrary(), llvm::writeToOutput(), writeUniversalArchsToStream(), llvm::object::writeUniversalBinary(), and llvm::yaml::yaml2ObjectFile().

Friends And Related Function Documentation

◆ Expected

template<class T >
template<class OtherT >
friend class Expected
friend

Definition at line 483 of file Error.h.

◆ ExpectedAsOutParameter

template<class T >
template<class T1 >
friend class ExpectedAsOutParameter
friend

Definition at line 482 of file Error.h.

Member Data Documentation

◆ ErrorStorage

template<class T >
AlignedCharArrayUnion<error_type> llvm::Expected< T >::ErrorStorage

Definition at line 731 of file Error.h.

◆ TStorage

template<class T >
AlignedCharArrayUnion<storage_type> llvm::Expected< T >::TStorage

Definition at line 730 of file Error.h.


The documentation for this class was generated from the following files: