LLVM
13.0.0git
|
#include "llvm/ADT/APInt.h"
Public Types | |
using | value_type = T |
Public Member Functions | |
constexpr | Optional () |
constexpr | Optional (NoneType) |
constexpr | Optional (const T &y) |
constexpr | Optional (const Optional &O)=default |
constexpr | Optional (T &&y) |
constexpr | Optional (Optional &&O)=default |
Optional & | operator= (T &&y) |
Optional & | operator= (Optional &&O)=default |
template<typename... ArgTypes> | |
void | emplace (ArgTypes &&... Args) |
Create a new object by constructing it in place with the given arguments. More... | |
Optional & | operator= (const T &y) |
Optional & | operator= (const Optional &O)=default |
void | reset () |
constexpr const T * | getPointer () const |
T * | getPointer () |
constexpr const T & | getValue () const LLVM_LVALUE_FUNCTION |
T & | getValue () LLVM_LVALUE_FUNCTION |
constexpr | operator bool () const |
constexpr bool | hasValue () const |
constexpr const T * | operator-> () const |
T * | operator-> () |
constexpr const T & | operator* () const LLVM_LVALUE_FUNCTION |
T & | operator* () LLVM_LVALUE_FUNCTION |
template<typename U > | |
constexpr T | getValueOr (U &&value) const LLVM_LVALUE_FUNCTION |
template<class Function > | |
auto | map (const Function &F) const LLVM_LVALUE_FUNCTION -> Optional< decltype(F(getValue()))> |
Apply a function to the value if present; otherwise return None. More... | |
Static Public Member Functions | |
static constexpr Optional | create (const T *y) |
using llvm::Optional< T >::value_type = T |
Definition at line 243 of file Optional.h.
|
inlineconstexpr |
Definition at line 245 of file Optional.h.
Referenced by llvm::Optional< uint64_t >::create().
|
inlineconstexpr |
Definition at line 246 of file Optional.h.
|
inlineconstexpr |
Definition at line 248 of file Optional.h.
|
constexprdefault |
|
inlineconstexpr |
Definition at line 251 of file Optional.h.
|
constexprdefault |
|
inlinestaticconstexpr |
Definition at line 266 of file Optional.h.
|
inline |
Create a new object by constructing it in place with the given arguments.
Definition at line 262 of file Optional.h.
Referenced by llvm::CloneFunctionInto(), lowerConstantIntrinsics(), llvm::ValueMap< const Function *, FuncInfo >::MD(), llvm::LegacyAARGetter::operator()(), llvm::NamedMDNode::print(), runImpl(), and runPartiallyInlineLibCalls().
|
inline |
Definition at line 279 of file Optional.h.
|
inlineconstexpr |
Definition at line 278 of file Optional.h.
Referenced by lowerConstantIntrinsics(), llvm::Optional< uint64_t >::operator->(), llvm::LoopInstSimplifyPass::run(), llvm::LoopRotatePass::run(), llvm::LoopSimplifyCFGPass::run(), llvm::SimpleLoopUnswitchPass::run(), runImpl(), and runPartiallyInlineLibCalls().
|
inlineconstexpr |
Definition at line 280 of file Optional.h.
Referenced by alignOutputBlockWithAggFunc(), assignSections(), llvm::VPlanSlp::buildGraph(), CC_RISCV(), CloneLoopBlocks(), collectRegionsConstants(), llvm::InnerLoopVectorizer::completeLoopSkeleton(), llvm::PPCELFStreamer::emitInstruction(), llvm::InstructionSelector::executeMatchTable(), findCostForOutputBlocks(), findExtractedInputToOverallInputMapping(), llvm::sys::Process::FindInEnvPath(), llvm::IRSimilarity::IRSimilarityIdentifier::findSimilarity(), llvm::SelectionDAG::FoldConstantArithmetic(), llvm::IRPosition::getAssociatedArgument(), llvm::Attributor::getAssumedConstant(), llvm::ProfileSummaryInfo::getColdCountThreshold(), getCopyFromPartsVector(), llvm::RegsForValue::getCopyFromRegs(), getCopyToPartsVector(), llvm::RegsForValue::getCopyToRegs(), GetDeoptBundleOperands(), llvm::MCSymbolWasm::getEventType(), llvm::MCSymbolWasm::getExportName(), llvm::AArch64TTIImpl::getGatherScatterOpCost(), llvm::MCSymbolWasm::getGlobalType(), llvm::ProfileSummaryInfo::getHotCountThreshold(), llvm::MCSymbolWasm::getImportModule(), getISDForVPIntrinsic(), llvm::ProfileSummaryInfo::getOrCompColdCountThreshold(), llvm::ProfileSummaryInfo::getOrCompHotCountThreshold(), getOrCreateCachedOptional(), llvm::IRSimilarity::IRInstructionData::getPredicate(), llvm::MCSchedModel::getReciprocalThroughput(), llvm::MCSymbolWasm::getTableType(), llvm::Optional< uint64_t >::getValueOr(), llvm::ProfileSummaryInfo::hasHugeWorkingSetSize(), llvm::ProfileSummaryInfo::hasLargeWorkingSetSize(), llvm::hasUnrollAndJamTransformation(), llvm::hasUnrollTransformation(), IntersectSignedRange(), IntersectUnsignedRange(), llvm::ProfileSummaryInfo::isColdCount(), llvm::ProfileSummaryInfo::isHotCount(), llvm::FileError::log(), llvm::M68kMCInstLower::Lower(), llvm::VETargetLowering::lowerToVVP(), llvm::Optional< uint64_t >::map(), llvm::detail::ValueIsMatcher< InnerMatcher >::Impl< T >::MatchAndExplain(), llvm::Optional< uint64_t >::operator*(), llvm::operator*(), llvm::operator/(), llvm::raw_ostream::operator<<(), llvm::LoopVectorizationPlanner::plan(), llvm::MachineBasicBlock::print(), llvm::LoopVectorizePass::processLoop(), llvm::RegsForValue::RegsForValue(), llvm::slpvectorizer::BoUpSLP::VLOperands::reorder(), replaceCalledFunction(), llvm::object::ELFObjectFileBase::setARMSubArch(), llvm::InstCombinerImpl::SimplifyDemandedUseBits(), llvm::InstCombinerImpl::SimplifyDemandedVectorElts(), tryToUnrollAndJamLoop(), tryToUnrollLoop(), verifyFuncBFI(), and llvm::InstCombinerImpl::visitCallInst().
|
inline |
Definition at line 283 of file Optional.h.
|
inlineconstexpr |
Definition at line 295 of file Optional.h.
Referenced by llvm::OptimizationRemarkEmitter::emit(), llvm::DWARFYAML::emitDebugInfo(), llvm::DWARFYAML::emitDebugLine(), llvm::AMDGPUAsmPrinter::emitGlobalVariable(), llvm::InstCombinerImpl::foldAggregateConstructionIntoAggregateReuse(), llvm::DWARFYAML::Data::getAbbrevTableInfoByID(), getAlign(), llvm::getBooleanLoopAttribute(), getDefaultInlineAdvice(), llvm::LLVMContext::getDiagnosticsHotnessThreshold(), llvm::DebugVariable::getFragmentOrDefault(), llvm::getOptionalElementCountLoopAttribute(), llvm::codegen::InitTargetOptionsFromCodeGenFlags(), llvm::AArch64InstrInfo::isFunctionSafeToOutlineFrom(), layout(), packAllocSizeArgs(), simplifyICmpOfBools(), llvm::dwarf::toAddress(), llvm::dwarf::toReference(), llvm::dwarf::toSectionOffset(), llvm::dwarf::toSigned(), llvm::dwarf::toUnsigned(), warnAboutLeftoverTransformations(), and llvm::write_double().
|
inlineconstexpr |
Definition at line 286 of file Optional.h.
Referenced by alignOutputBlockWithAggFunc(), llvm::DIExpression::appendToStack(), llvm::CombinerHelper::applyCombineConstantFoldFpUnary(), assignSections(), llvm::codeview::ContinuationRecordBuilder::begin(), CC_RISCV(), CloneLoopBlocks(), collectRegionsConstants(), llvm::pdb::PDBFileBuilder::commit(), llvm::InnerLoopVectorizer::completeLoopSkeleton(), llvm::BaseIndexOffset::computeAliasing(), computeKnownBitsFromShiftOperator(), llvm::PPCELFStreamer::emitInstruction(), llvm::MCObjectStreamer::emitRelocDirective(), llvm::InstructionSelector::executeMatchTable(), findCostForOutputBlocks(), findExtractedInputToOverallInputMapping(), llvm::sys::Process::FindInEnvPath(), findPreviousSpillSlot(), llvm::PeelingModuloScheduleExpander::fixupBranches(), llvm::codeview::TypeCollection::ForEachRecord(), llvm::format_provider< T, std::enable_if_t< detail::use_double_formatter< T >::value > >::format(), llvm::gatherPeelingPreferences(), llvm::gatherUnrollingPreferences(), llvm::IRPosition::getAssociatedArgument(), llvm::Attribute::getAsString(), llvm::Attributor::getAssumedConstant(), getCopyFromPartsVector(), getCopyToPartsVector(), GetDeoptBundleOperands(), llvm::ELFYAML::HashSection::getEntries(), llvm::ELFYAML::GnuHashSection::getEntries(), llvm::ELFYAML::AddrsigSection::getEntries(), llvm::ELFYAML::DependentLibrariesSection::getEntries(), llvm::ELFYAML::SymverSection::getEntries(), llvm::ELFYAML::RelrSection::getEntries(), llvm::ELFYAML::SymtabShndxSection::getEntries(), llvm::MCSymbolWasm::getEventType(), llvm::MCSymbolWasm::getGlobalType(), llvm::MCSymbolWasm::getImportModule(), getISDForVPIntrinsic(), llvm::BinaryStreamRefBase< WritableBinaryStreamRef, WritableBinaryStream >::getLength(), getOrCreateCachedOptional(), llvm::IRSimilarity::IRInstructionData::getPredicate(), llvm::MCSchedModel::getReciprocalThroughput(), getSearchPaths(), llvm::Optional< uint64_t >::getValueOr(), llvm::MCContext::getXCOFFSection(), llvm::MCSymbolWasm::hasExportName(), llvm::MCSymbolWasm::hasImportModule(), llvm::MCSymbolWasm::hasTableType(), llvm::hasUnrollAndJamTransformation(), llvm::hasUnrollTransformation(), llvm::AArch64FunctionInfo::initializeBaseYamlFields(), IntersectSignedRange(), IntersectUnsignedRange(), llvm::IRSimilarity::IRInstructionData::IRInstructionData(), llvm::RegsForValue::isABIMangled(), isColdBlock(), llvm::MCSectionXCOFF::isCsect(), llvm::LLVMContext::isDiagnosticsHotnessThresholdSetFromPSI(), llvm::RISCVTargetLowering::joinRegisterPartsIntoValue(), llvm::FileError::log(), llvm::M68kMCInstLower::Lower(), lowerConstantIntrinsics(), llvm::CombinerHelper::matchCombineConstantFoldFpUnary(), llvm::CombinerHelper::matchLoadOrCombine(), llvm::codeview::CodeViewRecordIO::maxFieldLength(), llvm::Optional< uint64_t >::operator bool(), llvm::raw_ostream::operator<<(), packAllocSizeArgs(), llvm::LoopVectorizePass::processLoop(), replaceCalledFunction(), llvm::IRSimilarity::IRSimilarityIdentifier::resetSimilarityCandidates(), llvm::LoopRotatePass::run(), llvm::LoopInstSimplifyPass::run(), llvm::LoopSimplifyCFGPass::run(), llvm::SimpleLoopUnswitchPass::run(), runImpl(), runPartiallyInlineLibCalls(), llvm::object::ELFObjectFileBase::setARMSubArch(), llvm::IRBuilderBase::setDefaultConstrainedExcept(), llvm::IRBuilderBase::setDefaultConstrainedRounding(), llvm::MCDwarfLineTableHeader::setRootFile(), llvm::MCDwarfLineTable::setRootFile(), llvm::InstCombinerImpl::SimplifyDemandedUseBits(), llvm::InstCombinerImpl::SimplifyDemandedVectorElts(), SolveQuadraticAddRecRange(), llvm::RISCVTargetLowering::splitValueIntoRegisterParts(), llvm::MCDwarfLineTableHeader::tryGetFile(), tryToUnrollAndJamLoop(), tryToUnrollLoop(), llvm::InstCombinerImpl::visitCallInst(), llvm::codeview::TypeRecordMapping::visitMemberBegin(), llvm::codeview::TypeRecordMapping::visitMemberEnd(), llvm::codeview::SymbolSerializer::visitSymbolBegin(), llvm::codeview::SymbolSerializer::visitSymbolEnd(), llvm::codeview::TypeRecordMapping::visitTypeBegin(), llvm::codeview::TypeRecordMapping::visitTypeEnd(), writeCOFF(), and llvm::codeview::ContinuationRecordBuilder::writeMemberType().
|
inline |
Apply a function to the value if present; otherwise return None.
Definition at line 301 of file Optional.h.
|
inlineexplicitconstexpr |
Definition at line 285 of file Optional.h.
|
inlineconstexpr |
Definition at line 289 of file Optional.h.
|
inline |
Definition at line 292 of file Optional.h.
|
inline |
Definition at line 288 of file Optional.h.
|
inlineconstexpr |
Definition at line 287 of file Optional.h.
|
default |
|
inline |
Definition at line 270 of file Optional.h.
|
default |
|
inline |
Definition at line 255 of file Optional.h.
|
inline |
Definition at line 276 of file Optional.h.
Referenced by llvm::ValueMap< const Function *, FuncInfo >::clear(), llvm::AttrBuilder::clear(), llvm::DWARFAbbreviationDeclaration::extract(), llvm::DbgVariableLocation::extractFromMachineInstruction(), llvm::AttrBuilder::remove(), llvm::AttrBuilder::removeAttribute(), llvm::DataLayout::reset(), llvm::ThinLTOCodeGenerator::setCachePruningInterval(), llvm::codeview::TypeRecordMapping::visitMemberEnd(), llvm::codeview::SymbolSerializer::visitSymbolEnd(), and llvm::codeview::TypeRecordMapping::visitTypeEnd().