|
LLVM
10.0.0
|
#include "llvm/ADT/APInt.h"
Public Types | |
| using | value_type = T |
Public Member Functions | |
| constexpr | Optional () |
| constexpr | Optional (NoneType) |
| Optional (const T &y) | |
| Optional (const Optional &O)=default | |
| Optional (T &&y) | |
| 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 () |
| const T * | getPointer () const |
| T * | getPointer () |
| const T & | getValue () const LLVM_LVALUE_FUNCTION |
| T & | getValue () LLVM_LVALUE_FUNCTION |
| operator bool () const | |
| bool | hasValue () const |
| const T * | operator-> () const |
| T * | operator-> () |
| 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 -> Optional< decltype(F(getValue()))> |
| Apply a function to the value if present; otherwise return None. More... | |
Static Public Member Functions | |
| static Optional | create (const T *y) |
| using llvm::Optional< T >::value_type = T |
Definition at line 219 of file Optional.h.
|
inline |
Definition at line 221 of file Optional.h.
|
inline |
Definition at line 222 of file Optional.h.
|
inline |
Definition at line 224 of file Optional.h.
|
inline |
Definition at line 227 of file Optional.h.
|
default |
|
inlinestatic |
Definition at line 241 of file Optional.h.
|
inline |
Create a new object by constructing it in place with the given arguments.
Definition at line 237 of file Optional.h.
Referenced by llvm::remarks::BitstreamMetaSerializer::BitstreamMetaSerializer(), FunctionNumber(), llvm::DIFile::ChecksumInfo< llvm::MDString *>::getKindAsString(), llvm::ValueMap< const Function *, FuncInfo >::MD(), llvm::LegacyAARGetter::operator()(), and llvm::NamedMDNode::print().
|
inline |
Definition at line 253 of file Optional.h.
Referenced by llvm::LoopRotatePass::run(), llvm::LoopInstSimplifyPass::run(), llvm::LoopSimplifyCFGPass::run(), llvm::SimpleLoopUnswitchPass::run(), and simplifyLoopInst().
|
inline |
Definition at line 254 of file Optional.h.
|
inline |
Definition at line 255 of file Optional.h.
Referenced by llvm::vfs::YAMLVFSWriter::addFileMapping(), llvm::alignTo(), assertBranchOrSelectConditionHoisted(), llvm::VPlanSlp::buildGraph(), calculateOffsetDiff(), llvm::slpvectorizer::BoUpSLP::canMapToVector(), cloneConstantExprWithNewAddressSpace(), CloneLoopBlocks(), llvm::createAArch64StackTaggingPass(), llvm::IRBuilder< TargetFolder >::CreateUnreachable(), llvm::InnerLoopVectorizer::createVectorizedLoopSkeleton(), llvm::DWARFFormValue::dump(), dumpAttribute(), llvm::SIFrameLowering::emitEpilogue(), llvm::SIFrameLowering::emitPrologue(), llvm::InstructionSelector::executeMatchTable(), llvm::BitstreamWriter::ExitBlock(), llvm::sys::Process::FindInEnvPath(), llvm::IRPosition::getAssociatedArgument(), llvm::IRPosition::getAttrs(), llvm::ProfileSummaryInfo::getColdCountThreshold(), getComparePred(), getCopyFromPartsVector(), llvm::RegsForValue::getCopyFromRegs(), getCopyToPartsVector(), llvm::RegsForValue::getCopyToRegs(), GetDeoptBundleOperands(), llvm::MCSymbolWasm::getEventType(), llvm::SCEVExpander::getExactExistingExpansion(), llvm::MCSymbolWasm::getExportName(), llvm::MCSymbolWasm::getGlobalType(), llvm::ProfileSummaryInfo::getHotCountThreshold(), llvm::MCSymbolWasm::getImportModule(), llvm::MCSymbolWasm::getImportName(), llvm::ProfileSummaryInfo::getOrCompColdCountThreshold(), llvm::ProfileSummaryInfo::getOrCompHotCountThreshold(), getOrCreateCachedOptional(), GetRangeFromMetadata(), llvm::MCSchedModel::getReciprocalThroughput(), getSignature(), llvm::MCSymbolXCOFF::getStorageClass(), llvm::VFABI::getVectorVariantNames(), llvm::ProfileSummaryInfo::hasHugeWorkingSetSize(), llvm::ProfileSummaryInfo::hasLargeWorkingSetSize(), llvm::hasUnrollAndJamTransformation(), llvm::hasUnrollTransformation(), IntersectSignedRange(), IntersectUnsignedRange(), llvm::ProfileSummaryInfo::isColdCount(), llvm::slpvectorizer::BoUpSLP::isDeleted(), llvm::ProfileSummaryInfo::isHotCount(), isStackPtrRelative(), llvm::AMDGPULegalizerInfo::legalizeExtractVectorElt(), llvm::AMDGPULegalizerInfo::legalizeInsertVectorElt(), llvm::Log2(), llvm::detail::ValueIsMatcher< InnerMatcher >::Impl< T >::MatchAndExplain(), llvm::operator/(), llvm::raw_ostream::operator<<(), llvm::GCNTargetMachine::parseMachineFunctionInfo(), parseV5DirFileTables(), pickOpcodeForVT(), llvm::MachineBasicBlock::print(), llvm::LoopVectorizePass::processLoop(), PushDefUseChildren(), llvm::RegsForValue::RegsForValue(), llvm::slpvectorizer::BoUpSLP::VLOperands::reorder(), llvm::IRCEPass::run(), llvm::InlinerPass::run(), llvm::AMDGPUInstructionSelector::select(), llvm::MCSymbolXCOFF::setStorageClass(), llvm::VFABI::setVectorVariantNames(), tryToUnrollAndJamLoop(), and tryToUnrollLoop().
|
inline |
Definition at line 256 of file Optional.h.
|
inline |
Definition at line 266 of file Optional.h.
Referenced by llvm::Annotations::Annotations(), llvm::AAResults::canInstructionRangeModRef(), llvm::OptimizationRemarkEmitter::emit(), getBooleanLoopAttribute(), llvm::DIFile::getChecksumKind(), llvm::DebugVariable::getFragmentOrDefault(), llvm::MDNodeKeyImpl< DIFile >::getHashValue(), getTypeSize(), llvm::AArch64InstrInfo::isFunctionSafeToOutlineFrom(), layout(), packAllocSizeArgs(), simplifyICmpOfBools(), llvm::vfs::InMemoryFileSystem::toString(), warnAboutLeftoverTransformations(), llvm::write_double(), and llvm::write_hex().
|
inline |
Definition at line 259 of file Optional.h.
Referenced by llvm::vfs::YAMLVFSWriter::addFileMapping(), llvm::DIExpression::appendToStack(), llvm::DWARFAbbreviationDeclaration::AttributeSpec::AttributeSpec(), llvm::codeview::ContinuationRecordBuilder::begin(), llvm::slpvectorizer::BoUpSLP::canMapToVector(), cloneConstantExprWithNewAddressSpace(), CloneLoopBlocks(), collectContributionData(), llvm::pdb::PDBFileBuilder::commit(), llvm::yaml::commonSectionMapping(), llvm::BaseIndexOffset::computeAliasing(), computeKnownBitsFromShiftOperator(), llvm::IRBuilder< TargetFolder >::CreateUnreachable(), llvm::InnerLoopVectorizer::createVectorizedLoopSkeleton(), llvm::DWARFFormValue::dump(), llvm::codeview::CodeViewRecordIO::emitRawComment(), llvm::MCObjectStreamer::EmitRelocDirective(), EvaluateConstantChrecAtConstant(), llvm::InstructionSelector::executeMatchTable(), llvm::sys::Process::FindInEnvPath(), findPreviousSpillSlot(), llvm::codeview::TypeCollection::ForEachRecord(), llvm::format_provider< T, typename std::enable_if< detail::use_double_formatter< T >::value >::type >::format(), llvm::gatherUnrollingPreferences(), llvm::IRPosition::getAssociatedArgument(), llvm::Attribute::getAsString(), llvm::IRPosition::getAttrs(), llvm::CacheCost::getCacheCost(), getCopyFromPartsVector(), getCopyToPartsVector(), GetDeoptBundleOperands(), llvm::getEffectiveRelocModel(), getEffectiveRelocModel(), llvm::MCSymbolWasm::getEventType(), llvm::MCSymbolWasm::getGlobalType(), llvm::MCSymbolWasm::getImportModule(), llvm::MCSymbolWasm::getImportName(), llvm::BinaryStreamRefBase< WritableBinaryStreamRef, WritableBinaryStream >::getLength(), getOrCreateCachedOptional(), getRangeForAffineARHelper(), GetRangeFromMetadata(), llvm::MCSchedModel::getReciprocalThroughput(), getRelocModel(), getSearchPaths(), getSignature(), llvm::MCSymbolXCOFF::getStorageClass(), llvm::VFABI::getVectorVariantNames(), llvm::MCSymbolWasm::hasExportName(), llvm::MCSymbolWasm::hasImportName(), llvm::gsym::FunctionInfo::hasRichInfo(), llvm::hasUnrollAndJamTransformation(), llvm::hasUnrollTransformation(), llvm::BaseIndexOffset::hasValidOffset(), IntersectSignedRange(), IntersectUnsignedRange(), llvm::RegsForValue::isABIMangled(), llvm::slpvectorizer::BoUpSLP::isDeleted(), isStackPtrRelative(), llvm::codeview::CodeViewRecordIO::maxFieldLength(), MinOptional(), llvm::raw_ostream::operator<<(), llvm::operator==(), packAllocSizeArgs(), llvm::DWARFDebugFrame::parse(), llvm::BitcodeAnalyzer::printStats(), llvm::LoopVectorizePass::processLoop(), PushDefUseChildren(), reservePreviousStackSlotForValue(), llvm::IRCEPass::run(), llvm::LoopRotatePass::run(), llvm::LoopInstSimplifyPass::run(), llvm::LoopSimplifyCFGPass::run(), llvm::SimpleLoopUnswitchPass::run(), llvm::InlinerPass::run(), llvm::AMDGPUInstructionSelector::select(), llvm::MCDwarfLineTableHeader::setRootFile(), llvm::MCDwarfLineTable::setRootFile(), llvm::MCSymbolXCOFF::setStorageClass(), llvm::VFABI::setVectorVariantNames(), simplifyLoopInst(), SolveQuadraticAddRecExact(), SolveQuadraticAddRecRange(), stripTruncAndExt(), TruncIfPossible(), llvm::MCDwarfLineTableHeader::tryGetFile(), tryToUnrollAndJamLoop(), tryToUnrollLoop(), llvm::codeview::SymbolSerializer::visitSymbolBegin(), llvm::codeview::SymbolSerializer::visitSymbolEnd(), writeCOFF(), and llvm::codeview::ContinuationRecordBuilder::writeMemberType().
|
inline |
Apply a function to the value if present; otherwise return None.
Definition at line 272 of file Optional.h.
|
inlineexplicit |
Definition at line 258 of file Optional.h.
|
inline |
Definition at line 262 of file Optional.h.
|
inline |
Definition at line 263 of file Optional.h.
|
inline |
Definition at line 260 of file Optional.h.
|
inline |
Definition at line 261 of file Optional.h.
|
inline |
Definition at line 230 of file Optional.h.
|
default |
|
inline |
Definition at line 245 of file Optional.h.
|
inline |
Definition at line 251 of file Optional.h.
Referenced by llvm::ValueMap< const Function *, FuncInfo >::clear(), llvm::DWARFAbbreviationDeclaration::extract(), llvm::DbgVariableLocation::extractFromMachineInstruction(), llvm::SITargetLowering::getTgtMemIntrinsic(), llvm::AArch64TargetLowering::getTgtMemIntrinsic(), llvm::NVPTXTargetLowering::getTgtMemIntrinsic(), llvm::ARMTargetLowering::getTgtMemIntrinsic(), and llvm::codeview::SymbolSerializer::visitSymbolEnd().
1.8.13