LLVM
15.0.0git
|
#include "llvm/ADT/APInt.h"
Public Types | |
using | value_type = T |
Public Member Functions | |
constexpr | Optional ()=default |
constexpr | Optional (NoneType) |
constexpr | Optional (const T &y) |
constexpr | Optional (const Optional &O)=default |
constexpr | Optional (T &&y) |
constexpr | Optional (Optional &&O)=default |
template<typename... ArgTypes> | |
constexpr | Optional (in_place_t, ArgTypes &&...Args) |
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 & | value () const & |
constexpr const T & | getValue () const & |
T & | value () & |
T & | getValue () & |
constexpr | operator bool () const |
constexpr bool | has_value () const |
constexpr bool | hasValue () const |
constexpr const T * | operator-> () const |
T * | operator-> () |
constexpr const T & | operator* () const & |
T & | operator* () & |
template<typename U > | |
constexpr T | value_or (U &&alt) const & |
template<typename U > | |
constexpr T | getValueOr (U &&alt) const & |
template<class Function > | |
auto | map (const Function &F) const &-> Optional< decltype(F(value()))> |
Apply a function to the value if present; otherwise return None. More... | |
T && | value () && |
T && | getValue () && |
T && | operator* () && |
template<typename U > | |
T | value_or (U &&alt) && |
template<typename U > | |
T | getValueOr (U &&alt) && |
template<class Function > | |
auto | map (const Function &F) &&-> Optional< decltype(F(std::move(*this).value()))> |
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 265 of file Optional.h.
|
constexprdefault |
Referenced by llvm::Optional< uint64_t >::create().
|
inlineconstexpr |
Definition at line 268 of file Optional.h.
|
inlineconstexpr |
Definition at line 270 of file Optional.h.
|
constexprdefault |
|
inlineconstexpr |
Definition at line 273 of file Optional.h.
|
constexprdefault |
|
inlineconstexpr |
Definition at line 277 of file Optional.h.
|
inlinestaticconstexpr |
Definition at line 291 of file Optional.h.
|
inline |
Create a new object by constructing it in place with the given arguments.
Definition at line 287 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 304 of file Optional.h.
|
inlineconstexpr |
Definition at line 303 of file Optional.h.
Referenced by llvm::MCObjectFileInfo::getDarwinTargetVariantTriple(), lowerConstantIntrinsics(), llvm::Optional< uint64_t >::operator->(), llvm::LoopInstSimplifyPass::run(), llvm::LoopFlattenPass::run(), llvm::LoopRotatePass::run(), llvm::LoopSimplifyCFGPass::run(), llvm::SimpleLoopUnswitchPass::run(), runImpl(), and runPartiallyInlineLibCalls().
|
inline |
Definition at line 308 of file Optional.h.
|
inline |
Definition at line 334 of file Optional.h.
|
inlineconstexpr |
Definition at line 306 of file Optional.h.
Referenced by alignOutputBlockWithAggFunc(), CloneLoopBlocks(), collectRegionsConstants(), llvm::InstructionSelector::executeMatchTable(), llvm::LoopVectorizationPlanner::executePlan(), findExtractedInputToOverallInputMapping(), llvm::sys::Process::FindInEnvPath(), genericValueTraversal(), llvm::IRPosition::getAssociatedArgument(), llvm::Attributor::getAssumedConstant(), llvm::RegsForValue::getCopyFromRegs(), getCopyToPartsVector(), llvm::RegsForValue::getCopyToRegs(), llvm::MCSymbolWasm::getExportName(), llvm::MCSymbolWasm::getGlobalType(), getGVNForPHINode(), llvm::MCSymbolWasm::getImportModule(), getOrCreateCachedOptional(), llvm::VPIntrinsic::getPointerAlignment(), llvm::IRSimilarity::IRInstructionData::getPredicate(), llvm::MCSchedModel::getReciprocalThroughput(), llvm::MCSymbolWasm::getTableType(), handleArgs(), llvm::ProfileSummaryInfo::hasHugeWorkingSetSize(), llvm::ProfileSummaryInfo::hasLargeWorkingSetSize(), llvm::hasUnrollAndJamTransformation(), llvm::hasUnrollTransformation(), IntersectSignedRange(), IntersectUnsignedRange(), llvm::ProfileSummaryInfo::isColdCount(), llvm::ConstrainedFPIntrinsic::isDefaultFPEnvironment(), llvm::ProfileSummaryInfo::isHotCount(), llvm::FileError::log(), llvm::M68kMCInstLower::Lower(), llvm::raw_ostream::operator<<(), llvm::ifs::overrideIFSTarget(), llvm::MachineBasicBlock::print(), llvm::LoopUnrollPass::printPipeline(), llvm::LoopVectorizePass::processLoop(), llvm::RegsForValue::RegsForValue(), replaceCalledFunction(), llvm::object::ELFObjectFileBase::setARMSubArch(), llvm::LLVMContextImpl::setOpaquePointers(), llvm::InstCombinerImpl::SimplifyDemandedUseBits(), llvm::InstCombinerImpl::SimplifyDemandedVectorElts(), tryToUnrollAndJamLoop(), tryToUnrollLoop(), and llvm::InstCombinerImpl::visitCallInst().
Definition at line 340 of file Optional.h.
|
inlineconstexpr |
Definition at line 321 of file Optional.h.
|
inlineconstexpr |
Definition at line 311 of file Optional.h.
Referenced by getCopyFromPartsVector(), getCopyToPartsVector(), 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::Optional< uint64_t >::getValueOr(), llvm::MCContext::getXCOFFSection(), llvm::MCSymbolWasm::hasExportName(), llvm::MCSymbolWasm::hasImportModule(), llvm::LLVMContextImpl::hasOpaquePointersValue(), llvm::MCSymbolWasm::hasTableType(), llvm::RegsForValue::isABIMangled(), llvm::MCSectionXCOFF::isCsect(), llvm::LLVMContext::isDiagnosticsHotnessThresholdSetFromPSI(), llvm::RISCVTargetLowering::joinRegisterPartsIntoValue(), llvm::CombinerHelper::matchCombineConstantFoldFpUnary(), llvm::Optional< uint64_t >::operator bool(), llvm::MCDwarfLineTableHeader::setRootFile(), llvm::RISCVTargetLowering::splitValueIntoRegisterParts(), llvm::MCDwarfLineTableHeader::tryGetFile(), and llvm::Optional< uint64_t >::value_or().
|
inlineconstexpr |
Definition at line 312 of file Optional.h.
Referenced by llvm::M68kMCInstLower::Lower(), and llvm::MCDwarfLineTable::setRootFile().
|
inline |
Apply a function to the value if present; otherwise return None.
Definition at line 346 of file Optional.h.
|
inline |
Apply a function to the value if present; otherwise return None.
Definition at line 327 of file Optional.h.
|
inlineexplicitconstexpr |
Definition at line 310 of file Optional.h.
|
inline |
Definition at line 316 of file Optional.h.
|
inline |
Definition at line 335 of file Optional.h.
|
inlineconstexpr |
Definition at line 315 of file Optional.h.
|
inline |
Definition at line 314 of file Optional.h.
|
inlineconstexpr |
Definition at line 313 of file Optional.h.
|
default |
|
inline |
Definition at line 295 of file Optional.h.
|
default |
|
inline |
Definition at line 280 of file Optional.h.
|
inline |
Definition at line 301 of file Optional.h.
Referenced by llvm::ValueMap< const Function *, FuncInfo >::clear(), llvm::DWARFAbbreviationDeclaration::extract(), llvm::DataLayout::reset(), llvm::ThinLTOCodeGenerator::setCachePruningInterval(), llvm::ifs::stripIFSTarget(), llvm::codeview::TypeRecordMapping::visitMemberEnd(), and llvm::codeview::SymbolSerializer::visitSymbolEnd().
|
inline |
Definition at line 307 of file Optional.h.
|
inline |
Definition at line 333 of file Optional.h.
|
inlineconstexpr |
Definition at line 305 of file Optional.h.
Referenced by llvm::DebugStr(), llvm::NVPTXTargetLowering::getPrototype(), llvm::Optional< uint64_t >::getValueOr(), llvm::NVPTXTargetLowering::LowerCall(), llvm::Optional< uint64_t >::map(), llvm::Optional< uint64_t >::operator*(), and llvm::Optional< uint64_t >::value_or().
Definition at line 337 of file Optional.h.
|
inlineconstexpr |
Definition at line 318 of file Optional.h.
Referenced by llvm::OptimizationRemarkEmitter::emit(), llvm::DWARFYAML::emitDebugInfo(), llvm::DWARFYAML::emitDebugLine(), emitDXILValidatorVersion(), llvm::AMDGPUAsmPrinter::emitGlobalVariable(), llvm::OutlinableRegion::findCorrespondingValueIn(), llvm::InstCombinerImpl::foldAggregateConstructionIntoAggregateReuse(), llvm::DWARFYAML::Data::getAbbrevTableInfoByID(), getAlign(), llvm::Attribute::getAsString(), llvm::getBooleanLoopAttribute(), llvm::ProfileSummaryInfo::getColdCountThreshold(), getDefaultInlineAdvice(), llvm::LLVMContext::getDiagnosticsHotnessThreshold(), llvm::LLVMContext::getDiagnosticsMisExpectTolerance(), llvm::ProfileSummaryInfo::getHotCountThreshold(), llvm::getIntLoopAttribute(), llvm::getOptionalElementCountLoopAttribute(), llvm::ProfileSummaryInfo::getOrCompColdCountThreshold(), llvm::ProfileSummaryInfo::getOrCompHotCountThreshold(), llvm::ScalarEvolution::getSmallConstantTripMultiple(), llvm::slpvectorizer::BoUpSLP::getTreeCost(), llvm::codegen::InitTargetOptionsFromCodeGenFlags(), llvm::AArch64InstrInfo::isFunctionSafeToOutlineFrom(), layout(), maySpeculateLanes(), packAllocSizeArgs(), packVScaleRangeArgs(), simplifyAndInst(), simplifyICmpOfBools(), simplifyOrInst(), llvm::dwarf::toAddress(), llvm::dwarf::toReference(), llvm::dwarf::toSectionOffset(), llvm::dwarf::toSigned(), llvm::dwarf::toUnsigned(), warnAboutLeftoverTransformations(), and llvm::write_double().