LLVM  6.0.0svn
Public Member Functions | Static Public Member Functions | Protected Member Functions | Friends | List of all members
llvm::Error Class Reference

Lightweight error class with error context and mandatory checking. More...

#include "llvm/Support/Error.h"

Inheritance diagram for llvm::Error:
Inheritance graph
[legend]

Public Member Functions

 Error (const Error &Other)=delete
 
 Error (Error &&Other)
 Move-construct an error value. More...
 
 Error (std::unique_ptr< ErrorInfoBase > Payload)
 Create an error value. More...
 
Erroroperator= (const Error &Other)=delete
 
Erroroperator= (Error &&Other)
 Move-assign an error value. More...
 
 ~Error ()
 Destroy a Error. More...
 
 operator bool ()
 Bool conversion. More...
 
template<typename ErrT >
bool isA () const
 Check whether one error is a subclass of another. More...
 
const void * dynamicClassID () const
 Returns the dynamic class id of this error, or null if this is a success value. More...
 

Static Public Member Functions

static ErrorSuccess success ()
 Create a success value. More...
 

Protected Member Functions

 Error ()
 Create a success value. Prefer using 'Error::success()' for readability. More...
 

Friends

class ErrorList
 
template<typename T >
class Expected
 
template<typename... HandlerTs>
Error handleErrors (Error E, HandlerTs &&... Handlers)
 Pass the ErrorInfo(s) contained in E to their respective handlers. More...
 

Detailed Description

Lightweight error class with error context and mandatory checking.

Instances of this class wrap a ErrorInfoBase pointer. Failure states are represented by setting the pointer to a ErrorInfoBase subclass instance containing information describing the failure. Success is represented by a null pointer value.

Instances of Error also contains a 'Checked' flag, which must be set before the destructor is called, otherwise the destructor will trigger a runtime error. This enforces at runtime the requirement that all Error instances be checked or returned to the caller.

There are two ways to set the checked flag, depending on what state the Error instance is in. For Error instances indicating success, it is sufficient to invoke the boolean conversion operator. E.g.:

Error foo(<...>);
if (auto E = foo(<...>))
return E; // <- Return E if it is in the error state.
// We have verified that E was in the success state. It can now be safely
// destroyed.

A success value can not be dropped. For example, just calling 'foo(<...>)' without testing the return value will raise a runtime error, even if foo returns success.

For Error instances representing failure, you must use either the handleErrors or handleAllErrors function with a typed handler. E.g.:

class MyErrorInfo : public ErrorInfo<MyErrorInfo> {
// Custom error info.
};
Error foo(<...>) { return make_error<MyErrorInfo>(...); }
auto E = foo(<...>); // <- foo returns failure with MyErrorInfo.
auto NewE =
[](const MyErrorInfo &M) {
// Deal with the error.
},
[](std::unique_ptr<OtherError> M) -> Error {
if (canHandle(*M)) {
// handle error.
return Error::success();
}
// Couldn't handle this error instance. Pass it up the stack.
return Error(std::move(M));
);
// Note - we must check or return NewE in case any of the handlers
// returned a new error.

The handleAllErrors function is identical to handleErrors, except that it has a void return type, and requires all errors to be handled and no new errors be returned. It prevents errors (assuming they can all be handled) from having to be bubbled all the way to the top-level.

All Error instances must be checked before destruction, even if they're moved-assigned or constructed from Success values that have already been checked. This enforces checking through all levels of the call stack.

Definition at line 156 of file Error.h.

Constructor & Destructor Documentation

◆ Error() [1/4]

llvm::Error::Error ( )
inlineprotected

Create a success value. Prefer using 'Error::success()' for readability.

Definition at line 171 of file Error.h.

References llvm::lltok::Error, Other, and llvm::success.

◆ Error() [2/4]

llvm::Error::Error ( const Error Other)
delete

◆ Error() [3/4]

llvm::Error::Error ( Error &&  Other)
inline

Move-construct an error value.

The newly constructed error is considered unchecked, even if the source error had been checked. The original error becomes a checked Success value, regardless of its original state.

Definition at line 186 of file Error.h.

◆ Error() [4/4]

llvm::Error::Error ( std::unique_ptr< ErrorInfoBase Payload)
inline

Create an error value.

Prefer using the 'make_error' function, but this constructor can be useful when "re-throwing" errors from handlers.

Definition at line 193 of file Error.h.

◆ ~Error()

llvm::Error::~Error ( )
inline

Destroy a Error.

Fails with a call to abort() if the error is unchecked.

Definition at line 222 of file Error.h.

References getPtr().

Member Function Documentation

◆ dynamicClassID()

const void* llvm::Error::dynamicClassID ( ) const
inline

Returns the dynamic class id of this error, or null if this is a success value.

Definition at line 242 of file Error.h.

References getPtr(), LLVM_ATTRIBUTE_NORETURN, and LLVM_UNLIKELY.

◆ isA()

template<typename ErrT >
bool llvm::Error::isA ( ) const
inline

Check whether one error is a subclass of another.

Definition at line 236 of file Error.h.

References getPtr().

Referenced by llvm::orc::rpc::detail::RespondHelper< true >::sendResult().

◆ operator bool()

llvm::Error::operator bool ( )
inlineexplicit

Bool conversion.

Returns true if this Error is in a failure state, and false if it is in an accept state. If the error is in a Success state it will be considered checked.

Definition at line 230 of file Error.h.

References getPtr().

◆ operator=() [1/2]

Error& llvm::Error::operator= ( const Error Other)
delete

◆ operator=() [2/2]

Error& llvm::Error::operator= ( Error &&  Other)
inline

Move-assign an error value.

The current error must represent success, you you cannot overwrite an unhandled error. The current error is then considered unchecked. The source error becomes a checked success value, regardless of its original state.

Definition at line 205 of file Error.h.

◆ success()

ErrorSuccess llvm::Error::success ( )
inlinestatic

Create a success value.

Definition at line 313 of file Error.h.

Referenced by llvm::lto::LTO::add(), llvm::pdb::DbiStreamBuilder::addDbgStream(), llvm::InstrProfSymtab::addFuncName(), llvm::pdb::DbiStreamBuilder::addModuleSourceFile(), llvm::pdb::PDBFileBuilder::addNamedStream(), llvm::lto::Config::addSaveTemps(), llvm::pdb::TpiStreamBuilder::addTypeRecord(), llvm::allocValueProfData(), llvm::orc::rpc::detail::RPCEndpointBase< SingleThreadedRPCEndpoint< ChannelT, FunctionIdT, SequenceNumberT >, ChannelT, FunctionIdT, SequenceNumberT >::appendCallAsync(), llvm::orc::rpc::MultiThreadedRPCEndpoint< ChannelT, FunctionIdT, SequenceNumberT >::appendCallNB(), llvm::ErrorHandlerTraits< void(&)(ErrT &)>::apply(), llvm::ErrorHandlerTraits< void(&)(std::unique_ptr< ErrT >)>::apply(), llvm::object::Archive::Archive(), llvm::lto::backend(), llvm::codeview::CodeViewRecordIO::beginRecord(), llvm::orc::rpc::SingleThreadedRPCEndpoint< rpc::RawByteChannel >::callB(), llvm::codeview::LazyRandomTypeCollection::capacity(), checkDyldCommand(), checkDyldInfoCommand(), checkDylibCommand(), checkDylibIdCommand(), checkDysymtabCommand(), checkEncryptCommand(), checkHashHdrVersion(), checkLinkeditDataCommand(), checkLinkerOptCommand(), checkNoteCommand(), llvm::BinaryStream::checkOffsetForRead(), llvm::BinaryStreamRefBase< WritableBinaryStreamRef, WritableBinaryStream >::checkOffsetForRead(), llvm::WritableBinaryStream::checkOffsetForWrite(), checkOverlappingElement(), checkRpathCommand(), checkSubCommand(), llvm::object::MachOObjectFile::checkSymbolTable(), checkSymtabCommand(), checkThreadCommand(), checkTwoLevelHintsCommand(), checkVersCommand(), llvm::collectPGOFuncNameStrings(), llvm::pdb::SymbolStream::commit(), llvm::pdb::GSIHashStreamBuilder::commit(), llvm::pdb::NamedStreamMap::commit(), llvm::pdb::PDBStringTableBuilder::commit(), llvm::codeview::DebugSymbolsSubsection::commit(), llvm::pdb::InfoStreamBuilder::commit(), llvm::pdb::HashTable::commit(), llvm::codeview::DebugFrameDataSubsection::commit(), llvm::pdb::GSIStreamBuilder::commit(), llvm::codeview::DebugCrossModuleExportsSubsection::commit(), llvm::pdb::ModuleDebugStreamRef::commit(), llvm::pdb::TpiStream::commit(), llvm::pdb::TpiStreamBuilder::commit(), llvm::codeview::DebugSubsectionRecordBuilder::commit(), llvm::codeview::DebugStringTableSubsection::commit(), llvm::pdb::DbiStreamBuilder::commit(), llvm::pdb::DbiModuleDescriptorBuilder::commit(), llvm::codeview::DebugCrossModuleImportsSubsection::commit(), llvm::codeview::DebugChecksumsSubsection::commit(), llvm::codeview::DebugInlineeLinesSubsection::commit(), llvm::MutableBinaryByteStream::commit(), llvm::codeview::DebugLinesSubsection::commit(), llvm::AppendingBinaryByteStream::commit(), llvm::zlib::compress(), llvm::RuntimeDyldImpl::computeTotalAllocSize(), llvm::codeview::consume(), llvm::codeview::consume_numeric(), llvm::orc::rpc::SequenceTraits< ChannelT >::consumeSeparator(), llvm::object::Decompressor::create(), llvm::object::MachOUniversalBinary::create(), llvm::coverage::BinaryCoverageReader::create(), llvm::object::Archive::create(), llvm::object::MachOObjectFile::create(), llvm::InstrProfSymtab::create(), llvm::orc::remote::OrcRemoteTargetClient::Create(), llvm::pdb::DIASession::createFromExe(), llvm::pdb::DIASession::createFromPdb(), llvm::pdb::NativeSession::createFromPdb(), llvm::orc::LocalIndirectStubsManager< TargetT >::createStub(), llvm::orc::LocalIndirectStubsManager< TargetT >::createStubs(), llvm::orc::remote::OrcRemoteTargetClient::RemoteIndirectStubsManager::createStubs(), llvm::object::ObjectFile::createWasmObjectFile(), llvm::lto::createWriteIndexesThinBackend(), decodeLLVMAttributesForBitcode(), llvm::DWARFContext::defaultErrorHandler(), llvm::codeview::serialize_conditional_impl< T, U >::deserialize(), llvm::orc::rpc::SerializationTraits< ChannelT, JITSymbolFlags >::deserialize(), llvm::codeview::serialize_vector_tail_impl< T >::deserialize(), llvm::orc::rpc::SerializationTraits< ChannelT, T, T, typename std::enable_if< std::is_base_of< RawByteChannel, ChannelT >::value &&(std::is_same< T, uint8_t >::value||std::is_same< T, int8_t >::value||std::is_same< T, uint16_t >::value||std::is_same< T, int16_t >::value||std::is_same< T, uint32_t >::value||std::is_same< T, int32_t >::value||std::is_same< T, uint64_t >::value||std::is_same< T, int64_t >::value||std::is_same< T, char >::value)>::type >::deserialize(), llvm::orc::rpc::SerializationTraits< ChannelT, bool, bool, typename std::enable_if< std::is_base_of< RawByteChannel, ChannelT >::value >::type >::deserialize(), llvm::orc::rpc::SequenceSerialization< ChannelT >::deserialize(), llvm::orc::rpc::SerializationTraits< ChannelT, Error >::deserialize(), llvm::orc::rpc::SerializationTraits< ChannelT, Expected< T1 >, Expected< T2 > >::deserialize(), llvm::orc::rpc::SerializationTraits< ChannelT, std::vector< T > >::deserialize(), llvm::codeview::SymbolDeserializer::deserializeAs(), llvm::codeview::TypeDeserializer::deserializeAs(), llvm::orc::RTDyldObjectLinkingLayer::emitAndFinalize(), llvm::RuntimeDyldImpl::emitCommonSymbols(), llvm::orc::OrcAArch64::emitIndirectStubsBlock(), llvm::orc::OrcX86_64_Base::emitIndirectStubsBlock(), llvm::orc::OrcI386::emitIndirectStubsBlock(), llvm::orc::rpc::SequenceTraits< ChannelT >::emitSeparator(), llvm::orc::rpc::RawByteChannel::endReceiveMessage(), llvm::codeview::CodeViewRecordIO::endRecord(), llvm::orc::rpc::RawByteChannel::endSendMessage(), llvm::InstrProfReader::error(), llvm::errorToErrorCodeAndEmitErrors(), llvm::coverage::CounterMappingContext::evaluate(), llvm::RuntimeDyldMachOCRTPBase< RuntimeDyldMachOX86_64 >::finalizeLoad(), llvm::RuntimeDyldELF::finalizeLoad(), llvm::RuntimeDyldCOFFX86_64::finalizeLoad(), llvm::RuntimeDyldImpl::finalizeLoad(), llvm::pdb::InfoStreamBuilder::finalizeMsfLayout(), llvm::pdb::GSIStreamBuilder::finalizeMsfLayout(), llvm::pdb::TpiStreamBuilder::finalizeMsfLayout(), llvm::pdb::DbiStreamBuilder::finalizeMsfLayout(), llvm::pdb::DbiModuleDescriptorBuilder::finalizeMsfLayout(), llvm::RuntimeDyldMachOX86_64::finalizeSection(), llvm::RuntimeDyldMachOI386::finalizeSection(), llvm::RuntimeDyldMachOARM::finalizeSection(), llvm::RuntimeDyldMachOAArch64::finalizeSection(), finishVisitation(), llvm::CodeViewYAML::detail::UnknownSymbolRecord::fromCodeViewSymbol(), getArrayElements(), getAttrFromCode(), llvm::pdb::DbiStream::getECName(), llvm::pdb::DbiStream::getECSubstreamData(), llvm::InstrProfReader::getError(), llvm::coverage::CovMapFunctionRecordV1< IntPtrT >::getFuncName(), llvm::coverage::CovMapFunctionRecord::getFuncName(), llvm::msf::MappedBlockStream::getLength(), llvm::object::Archive::Symbol::getMember(), llvm::windows_manifest::WindowsManifestMerger::getMergedManifest(), llvm::codeview::LazyRandomTypeCollection::getNext(), llvm::object::Archive::Child::getNext(), llvm::getOffset(), llvm::InstrProfReaderIndex< HashTableImpl >::getRecords(), llvm::pdb::PDBStringTable::getSignature(), llvm::pdb::DbiStreamBuilder::getSourceFileNameIndex(), llvm::pdb::PDBStringTable::getStringTable(), getSymbolKindName(), llvm::lto::getThinLTOOutputFile(), llvm::handleErrors(), handleNonPrevailingComdat(), llvm::orc::rpc::detail::ResponseHandlerImpl< ChannelT, void, HandlerT >::handleResponse(), llvm::orc::rpc::detail::ResponseHandlerImpl< ChannelT, Error, HandlerT >::handleResponse(), llvm::orc::rpc::detail::RPCEndpointBase< SingleThreadedRPCEndpoint< ChannelT, FunctionIdT, SequenceNumberT >, ChannelT, FunctionIdT, SequenceNumberT >::handleResponse(), llvm::orc::rpc::MultiThreadedRPCEndpoint< ChannelT, FunctionIdT, SequenceNumberT >::handlerLoop(), llvm::codeview::DebugFrameDataSubsectionRef::initialize(), llvm::pdb::DbiModuleDescriptor::initialize(), llvm::codeview::DebugStringTableSubsectionRef::initialize(), llvm::codeview::DebugSubsectionRecord::initialize(), llvm::pdb::PDBFileBuilder::initialize(), llvm::codeview::DebugChecksumsSubsectionRef::initialize(), llvm::codeview::DebugInlineeLinesSubsectionRef::initialize(), llvm::pdb::DbiModuleList::initialize(), llvm::codeview::DebugLinesSubsectionRef::initialize(), isCoverageMappingDummy(), llvm::coverage::RawCoverageMappingDummyChecker::isDummy(), isIdRecord(), llvm::object::isNotObjectErrorInvalidFileType(), jumpToValueSymbolTable(), llvm::sys::fs::TempFile::keep(), llvm::pdb::NamedStreamMap::load(), llvm::pdb::HashTable::load(), loadBinaryFormat(), LoadDIA(), loadELF64(), llvm::RuntimeDyldELF::loadObject(), llvm::DWARFContext::loadRegisterInfo(), loadSectionContribs(), loadTestingFormat(), loadYAML(), llvm::lto::localCache(), llvm::orc::LocalJITCompileCallbackManager< TargetT >::LocalJITCompileCallbackManager(), llvm::object::MachOUniversalBinary::MachOUniversalBinary(), llvm::codeview::CodeViewRecordIO::mapByteVectorTail(), llvm::codeview::CodeViewRecordIO::mapEncodedInteger(), llvm::codeview::CodeViewRecordIO::mapEnum(), llvm::codeview::CodeViewRecordIO::mapGuid(), llvm::codeview::CodeViewRecordIO::mapInteger(), mapLocalVariableAddrRange(), mapNameAndUniqueName(), llvm::codeview::CodeViewRecordIO::mapObject(), llvm::codeview::CodeViewRecordIO::mapStringZ(), llvm::codeview::CodeViewRecordIO::mapStringZVectorZ(), llvm::codeview::CodeViewRecordIO::mapVectorN(), llvm::codeview::CodeViewRecordIO::mapVectorTail(), llvm::Module::materialize(), llvm::Module::materializeAll(), llvm::Module::materializeMetadata(), llvm::object::ResourceEntryRef::moveNext(), llvm::orc::rpc::APICalls< Funcs >::negotiate(), llvm::VarStreamArrayExtractor< CrossModuleImportItem >::operator()(), llvm::VarStreamArrayExtractor< pdb::DbiModuleDescriptor >::operator()(), llvm::codeview::LineColumnExtractor::operator()(), llvm::VarStreamArrayExtractor< codeview::DebugSubsectionRecord >::operator()(), llvm::VarStreamArrayExtractor< codeview::CVRecord< Kind > >::operator()(), llvm::orc::rpc::detail::ReadArgs< ArgTs... >::operator()(), llvm::BinaryStreamWriter::padToAlignment(), llvm::object::Parser::parse(), llvm::object::WindowsResourceParser::parse(), parseBuildVersionCommand(), llvm::pdb::PDBFile::parseFileHeaders(), llvm::MetadataLoader::MetadataLoaderImpl::parseMetadata(), llvm::MetadataLoader::MetadataLoaderImpl::parseMetadataAttachment(), llvm::MetadataLoader::MetadataLoaderImpl::parseMetadataKinds(), parseSegmentLoadCommand(), llvm::pdb::PDBFile::parseStreamData(), llvm::RuntimeDyldMachO::populateIndirectSymbolPointersSection(), llvm::pdb::GSIHashTable::read(), llvm::coverage::RawCoverageFilenamesReader::read(), llvm::coverage::RawCoverageMappingReader::read(), llvm::BinaryStreamReader::readArray(), llvm::BinaryByteStream::readBytes(), llvm::BinaryItemStream< T, Traits >::readBytes(), llvm::msf::MappedBlockStream::readBytes(), llvm::BinaryStreamReader::readBytes(), llvm::AppendingBinaryByteStream::readBytes(), readCoverageMappingData(), llvm::BinaryStreamReader::readCString(), llvm::BinaryStreamReader::readEnum(), llvm::BinaryStreamReader::readFixedString(), readGSIHashBuckets(), readGSIHashHeader(), readGSIHashRecords(), readInitExpr(), llvm::BinaryStreamReader::readInteger(), llvm::coverage::RawCoverageReader::readIntMax(), llvm::BinaryByteStream::readLongestContiguousChunk(), llvm::BinaryItemStream< T, Traits >::readLongestContiguousChunk(), llvm::BinaryStreamReader::readLongestContiguousChunk(), llvm::msf::MappedBlockStream::readLongestContiguousChunk(), llvm::AppendingBinaryByteStream::readLongestContiguousChunk(), llvm::BinaryStreamRef::readLongestContiguousChunk(), llvm::coverage::BinaryCoverageReader::readNextRecord(), llvm::BinaryStreamReader::readObject(), llvm::readPGOFuncNameStrings(), readSection(), llvm::coverage::RawCoverageReader::readSize(), llvm::BinaryStreamReader::readStreamRef(), llvm::coverage::RawCoverageReader::readString(), llvm::object::readStringOrId(), llvm::coverage::RawCoverageReader::readULEB128(), readWideAPInt(), llvm::BinaryStreamReader::readWideString(), llvm::orc::rpc::registerStringError(), llvm::pdb::SymbolStream::reload(), llvm::pdb::PublicsStream::reload(), llvm::pdb::InfoStream::reload(), llvm::pdb::PDBStringTable::reload(), llvm::pdb::ModuleDebugStreamRef::reload(), llvm::pdb::TpiStream::reload(), llvm::pdb::DbiStream::reload(), llvm::pdb::GlobalsStream::reload(), llvm::orc::remote::OrcRemoteTargetClient::RemoteCompileCallbackManager::RemoteCompileCallbackManager(), llvm::orc::RemoteObjectServerLayer< BaseLayerT, RPCEndpoint >::RemoteObjectServerLayer(), llvm::orc::RTDyldObjectLinkingLayer::removeObject(), llvm::RuntimeDyldImpl::resolveExternalSymbols(), llvm::lto::LTO::run(), llvm::orc::rpc::detail::HandlerTraits< RetT(ArgTs...)>::run(), llvm::orc::CtorDtorRunner< JITLayerT >::runViaLayer(), llvm::orc::rpc::SerializationTraits< ChannelT, bool, bool, typename std::enable_if< std::is_base_of< RawByteChannel, ChannelT >::value >::type >::serialize(), llvm::orc::rpc::SequenceSerialization< ChannelT >::serialize(), llvm::orc::rpc::SerializationTraits< ChannelT, std::vector< T > >::serialize(), llvm::msf::MSFBuilder::setBlockMapAddr(), llvm::msf::MSFBuilder::setDirectoryBlocksHint(), llvm::InstrProfWriter::setIsIRLevelProfile(), llvm::msf::MSFBuilder::setStreamSize(), llvm::pdb::PDBStringTableBuilder::setStrings(), llvm::BinaryStreamReader::skip(), llvm::codeview::CodeViewRecordIO::skipPadding(), llvm::orc::rpc::RawByteChannel::startReceiveMessage(), llvm::orc::rpc::RawByteChannel::startSendMessage(), llvm::JITSymbol::takeError(), llvm::SoftInstrProfErrors::takeError(), llvm::Expected< T >::takeError(), llvm::orc::remote::OrcRemoteTargetClient::terminateSession(), llvm::lto::thinBackend(), llvm::CodeViewYAML::toCodeViewSubsectionList(), llvm::zlib::uncompress(), llvm::orc::CompileOnDemandLayer< CompileLayerT, CompileCallbackMgr >::updatePointer(), llvm::orc::LocalIndirectStubsManager< TargetT >::updatePointer(), llvm::orc::remote::OrcRemoteTargetClient::RemoteIndirectStubsManager::updatePointer(), llvm::msf::validateSuperBlock(), llvm::codeview::detail::visitDebugSubsections(), visitKnownMember(), llvm::pdb::NativeEnumSymbol::visitKnownMember(), visitKnownRecord(), llvm::pdb::NativeEnumSymbol::visitKnownRecord(), llvm::codeview::TypeRecordMapping::visitMemberBegin(), llvm::codeview::TypeVisitorCallbacks::visitMemberBegin(), llvm::codeview::TypeDumpVisitor::visitMemberBegin(), llvm::codeview::TypeVisitorCallbackPipeline::visitMemberBegin(), llvm::codeview::TypeRecordMapping::visitMemberEnd(), llvm::codeview::TypeVisitorCallbacks::visitMemberEnd(), llvm::codeview::TypeDumpVisitor::visitMemberEnd(), llvm::codeview::TypeVisitorCallbackPipeline::visitMemberEnd(), llvm::codeview::FieldListDeserializer::visitMemberEnd(), visitMemberRecord(), llvm::codeview::SymbolRecordMapping::visitSymbolBegin(), llvm::codeview::SymbolVisitorCallbacks::visitSymbolBegin(), llvm::codeview::SymbolVisitorCallbackPipeline::visitSymbolBegin(), llvm::codeview::SymbolSerializer::visitSymbolBegin(), llvm::codeview::SymbolRecordMapping::visitSymbolEnd(), llvm::codeview::SymbolVisitorCallbacks::visitSymbolEnd(), llvm::codeview::SymbolVisitorCallbackPipeline::visitSymbolEnd(), llvm::codeview::SymbolSerializer::visitSymbolEnd(), llvm::codeview::CVSymbolVisitor::visitSymbolStream(), llvm::codeview::TypeRecordMapping::visitTypeBegin(), llvm::codeview::TypeVisitorCallbacks::visitTypeBegin(), llvm::codeview::TypeVisitorCallbackPipeline::visitTypeBegin(), llvm::codeview::TypeDumpVisitor::visitTypeBegin(), llvm::codeview::TypeRecordMapping::visitTypeEnd(), llvm::codeview::TypeVisitorCallbacks::visitTypeEnd(), llvm::codeview::TypeDumpVisitor::visitTypeEnd(), llvm::codeview::TypeVisitorCallbackPipeline::visitTypeEnd(), llvm::codeview::DebugSubsectionVisitor::visitUnknown(), llvm::codeview::TypeVisitorCallbackPipeline::visitUnknownMember(), llvm::codeview::TypeVisitorCallbacks::visitUnknownMember(), llvm::codeview::TypeDumpVisitor::visitUnknownMember(), llvm::codeview::SymbolVisitorCallbackPipeline::visitUnknownSymbol(), llvm::codeview::SymbolVisitorCallbacks::visitUnknownSymbol(), llvm::codeview::TypeVisitorCallbacks::visitUnknownType(), llvm::codeview::TypeVisitorCallbackPipeline::visitUnknownType(), llvm::codeview::TypeDumpVisitor::visitUnknownType(), llvm::object::WasmObjectFile::WasmObjectFile(), llvm::BinaryStreamWriter::writeArray(), llvm::BinaryStreamWriter::writeBytes(), llvm::MutableBinaryByteStream::writeBytes(), llvm::msf::WritableMappedBlockStream::writeBytes(), llvm::AppendingBinaryByteStream::writeBytes(), llvm::BinaryStreamWriter::writeCString(), writeRecords(), llvm::BinaryStreamWriter::writeStreamRef(), llvm::InstrProfWriter::writeText(), llvm::object::writeWindowsResourceCOFF(), llvm::ErrorAsOutParameter::~ErrorAsOutParameter(), and llvm::lto::ThinBackendProc::~ThinBackendProc().

Friends And Related Function Documentation

◆ ErrorList

friend class ErrorList
friend

Definition at line 159 of file Error.h.

◆ Expected

template<typename T >
friend class Expected
friend

Definition at line 167 of file Error.h.

◆ handleErrors

template<typename... HandlerTs>
Error handleErrors ( Error  E,
HandlerTs &&...  Handlers 
)
friend

Pass the ErrorInfo(s) contained in E to their respective handlers.

Any unhandled errors (or Errors returned by handlers) are re-concatenated and returned. Because this function returns an error, its result must also be checked or returned. If you intend to handle all errors use handleAllErrors (which returns void, and will abort() on unhandled errors) instead.

Definition at line 866 of file Error.h.


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