LLVM  6.0.0svn
Public Member Functions | List of all members
llvm::MetadataLoader::MetadataLoaderImpl Class Reference

Public Member Functions

 MetadataLoaderImpl (BitstreamCursor &Stream, Module &TheModule, BitcodeReaderValueList &ValueList, std::function< Type *(unsigned)> getTypeByID, bool IsImporting)
 
Error parseMetadata (bool ModuleLevel)
 Parse a METADATA_BLOCK. More...
 
bool hasFwdRefs () const
 
MetadatagetMetadataFwdRefOrLoad (unsigned ID)
 
MDNodegetMDNodeFwdRefOrNull (unsigned Idx)
 
DISubprogramlookupSubprogramForFunction (Function *F)
 
bool hasSeenOldLoopTags ()
 
Error parseMetadataAttachment (Function &F, const SmallVectorImpl< Instruction *> &InstructionList)
 Parse metadata attachments. More...
 
Error parseMetadataKinds ()
 Parse the metadata kinds out of the METADATA_KIND_BLOCK. More...
 
void setStripTBAA (bool Value)
 
bool isStrippingTBAA ()
 
unsigned size () const
 
void shrinkTo (unsigned N)
 
void upgradeDebugIntrinsics (Function &F)
 

Detailed Description

Definition at line 415 of file MetadataLoader.cpp.

Constructor & Destructor Documentation

◆ MetadataLoaderImpl()

llvm::MetadataLoader::MetadataLoaderImpl::MetadataLoaderImpl ( BitstreamCursor Stream,
Module TheModule,
BitcodeReaderValueList ValueList,
std::function< Type *(unsigned)>  getTypeByID,
bool  IsImporting 
)
inline

Definition at line 629 of file MetadataLoader.cpp.

Member Function Documentation

◆ getMDNodeFwdRefOrNull()

MDNode* llvm::MetadataLoader::MetadataLoaderImpl::getMDNodeFwdRefOrNull ( unsigned  Idx)
inline

Definition at line 657 of file MetadataLoader.cpp.

◆ getMetadataFwdRefOrLoad()

Metadata* llvm::MetadataLoader::MetadataLoaderImpl::getMetadataFwdRefOrLoad ( unsigned  ID)
inline

Definition at line 641 of file MetadataLoader.cpp.

◆ hasFwdRefs()

bool llvm::MetadataLoader::MetadataLoaderImpl::hasFwdRefs ( ) const
inline

Definition at line 639 of file MetadataLoader.cpp.

◆ hasSeenOldLoopTags()

bool llvm::MetadataLoader::MetadataLoaderImpl::hasSeenOldLoopTags ( )
inline

Definition at line 665 of file MetadataLoader.cpp.

◆ isStrippingTBAA()

bool llvm::MetadataLoader::MetadataLoaderImpl::isStrippingTBAA ( )
inline

Definition at line 673 of file MetadataLoader.cpp.

◆ lookupSubprogramForFunction()

DISubprogram* llvm::MetadataLoader::MetadataLoaderImpl::lookupSubprogramForFunction ( Function F)
inline

◆ parseMetadata()

Error llvm::MetadataLoader::MetadataLoaderImpl::parseMetadata ( bool  ModuleLevel)

Parse a METADATA_BLOCK.

If ModuleLevel is true then we are parsing module level metadata.

Definition at line 847 of file MetadataLoader.cpp.

References llvm::GlobalVariable::addDebugInfo(), llvm::GlobalObject::addMetadata(), llvm::NamedMDNode::addOperand(), llvm::BitstreamCursor::advanceSkippingSubblocks(), assert(), llvm::SimpleBitstreamCursor::AtEndOfStream(), llvm::SmallVectorTemplateCommon< T, typename >::begin(), llvm::DICompositeType::buildODRType(), llvm::SmallVectorImpl< T >::clear(), llvm::DIFile::CSK_None, DisableLazyLoading, llvm::StringRef::drop_front(), E, llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::empty(), llvm::Function::empty(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::end(), llvm::SmallVectorTemplateCommon< T, typename >::end(), llvm::BitstreamEntry::EndBlock, llvm::BitstreamCursor::EnterSubBlock(), llvm::BitstreamEntry::Error, error(), false, llvm::ARMBuildAttrs::File, llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::find(), llvm::ValueAsMetadata::get(), llvm::LocalAsMetadata::get(), llvm::MDString::get(), llvm::MDNode::get(), GET_OR_DISTINCT, llvm::SimpleBitstreamCursor::GetCurrentBitNo(), llvm::MDNode::getDistinct(), llvm::Module::getOrInsertNamedMetadata(), llvm::BitcodeReaderValueList::getValueFwdRef(), I, llvm::BitstreamEntry::ID, llvm::object::Identifier, ImportFullTypeDefinitions, llvm::Function::isMaterializable(), llvm::Type::isMetadataTy(), llvm::Type::isVoidTy(), llvm::SimpleBitstreamCursor::JumpToBit(), llvm::BitstreamEntry::Kind, LLVM_FALLTHROUGH, LLVM_UNLIKELY, llvm::max(), llvm::mayBeOldLoopAttachmentTag(), llvm::bitc::METADATA_BASIC_TYPE, llvm::bitc::METADATA_BLOCK_ID, llvm::bitc::METADATA_COMPILE_UNIT, llvm::bitc::METADATA_COMPOSITE_TYPE, llvm::bitc::METADATA_DERIVED_TYPE, llvm::bitc::METADATA_DISTINCT_NODE, llvm::bitc::METADATA_ENUMERATOR, llvm::bitc::METADATA_EXPRESSION, llvm::bitc::METADATA_FILE, llvm::bitc::METADATA_GENERIC_DEBUG, llvm::bitc::METADATA_GLOBAL_DECL_ATTACHMENT, llvm::bitc::METADATA_GLOBAL_VAR, llvm::bitc::METADATA_GLOBAL_VAR_EXPR, llvm::bitc::METADATA_IMPORTED_ENTITY, llvm::bitc::METADATA_KIND, llvm::bitc::METADATA_LEXICAL_BLOCK, llvm::bitc::METADATA_LEXICAL_BLOCK_FILE, llvm::bitc::METADATA_LOCAL_VAR, llvm::bitc::METADATA_LOCATION, llvm::bitc::METADATA_MACRO, llvm::bitc::METADATA_MACRO_FILE, llvm::bitc::METADATA_MODULE, llvm::bitc::METADATA_NAME, llvm::bitc::METADATA_NAMED_NODE, llvm::bitc::METADATA_NAMESPACE, llvm::bitc::METADATA_NODE, llvm::bitc::METADATA_OBJC_PROPERTY, llvm::bitc::METADATA_OLD_FN_NODE, llvm::bitc::METADATA_OLD_NODE, llvm::bitc::METADATA_STRING_OLD, llvm::bitc::METADATA_STRINGS, llvm::bitc::METADATA_SUBPROGRAM, llvm::bitc::METADATA_SUBRANGE, llvm::bitc::METADATA_SUBROUTINE_TYPE, llvm::bitc::METADATA_TEMPLATE_TYPE, llvm::bitc::METADATA_TEMPLATE_VALUE, llvm::bitc::METADATA_VALUE, llvm::None, llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), llvm::BitstreamCursor::ReadBlockEnd(), llvm::BitstreamCursor::ReadCode(), llvm::BitstreamCursor::readRecord(), llvm::SimpleBitstreamCursor::ReadVBR(), llvm::BitstreamEntry::Record, llvm::report_fatal_error(), llvm::SmallVectorImpl< T >::reserve(), llvm::Function::setSubprogram(), llvm::BitcodeReaderValueList::size(), llvm::SmallVectorTemplateCommon< T, typename >::size(), llvm::StringRef::size(), llvm::ArrayRef< T >::size(), llvm::AMDGPU::HSAMD::Kernel::Arg::Key::Size, llvm::BitstreamCursor::SkipBlock(), llvm::StringRef::slice(), llvm::pdb::String, llvm::BitstreamEntry::SubBlock, llvm::Error::success(), true, and llvm::IndexedInstrProf::Version.

◆ parseMetadataAttachment()

Error llvm::MetadataLoader::MetadataLoaderImpl::parseMetadataAttachment ( Function F,
const SmallVectorImpl< Instruction *> &  InstructionList 
)

◆ parseMetadataKinds()

Error llvm::MetadataLoader::MetadataLoaderImpl::parseMetadataKinds ( )

◆ setStripTBAA()

void llvm::MetadataLoader::MetadataLoaderImpl::setStripTBAA ( bool  Value)
inline

Definition at line 672 of file MetadataLoader.cpp.

◆ shrinkTo()

void llvm::MetadataLoader::MetadataLoaderImpl::shrinkTo ( unsigned  N)
inline

Definition at line 676 of file MetadataLoader.cpp.

◆ size()

unsigned llvm::MetadataLoader::MetadataLoaderImpl::size ( ) const
inline

Definition at line 675 of file MetadataLoader.cpp.

◆ upgradeDebugIntrinsics()

void llvm::MetadataLoader::MetadataLoaderImpl::upgradeDebugIntrinsics ( Function F)
inline

Definition at line 677 of file MetadataLoader.cpp.

References llvm::NamedMDNode::addOperand(), llvm::BitstreamCursor::advanceSkippingSubblocks(), llvm::BitstreamCursor::AF_DontPopBlockAtEnd, assert(), llvm::SmallVectorTemplateCommon< T >::begin(), llvm::SmallVectorImpl< T >::clear(), llvm::SmallVectorTemplateCommon< T >::end(), llvm::BitstreamEntry::EndBlock, llvm::BitstreamEntry::Error, error(), llvm::SimpleBitstreamCursor::GetCurrentBitNo(), llvm::Module::getOrInsertNamedMetadata(), llvm::BitstreamEntry::ID, llvm::SimpleBitstreamCursor::JumpToBit(), llvm::BitstreamEntry::Kind, llvm::bitc::METADATA_BASIC_TYPE, llvm::bitc::METADATA_COMPILE_UNIT, llvm::bitc::METADATA_COMPOSITE_TYPE, llvm::bitc::METADATA_DERIVED_TYPE, llvm::bitc::METADATA_DISTINCT_NODE, llvm::bitc::METADATA_ENUMERATOR, llvm::bitc::METADATA_EXPRESSION, llvm::bitc::METADATA_FILE, llvm::bitc::METADATA_GENERIC_DEBUG, llvm::bitc::METADATA_GLOBAL_DECL_ATTACHMENT, llvm::bitc::METADATA_GLOBAL_VAR, llvm::bitc::METADATA_GLOBAL_VAR_EXPR, llvm::bitc::METADATA_IMPORTED_ENTITY, llvm::bitc::METADATA_INDEX, llvm::bitc::METADATA_INDEX_OFFSET, llvm::bitc::METADATA_KIND, llvm::bitc::METADATA_LEXICAL_BLOCK, llvm::bitc::METADATA_LEXICAL_BLOCK_FILE, llvm::bitc::METADATA_LOCAL_VAR, llvm::bitc::METADATA_LOCATION, llvm::bitc::METADATA_MACRO, llvm::bitc::METADATA_MACRO_FILE, llvm::bitc::METADATA_MODULE, llvm::bitc::METADATA_NAME, llvm::bitc::METADATA_NAMED_NODE, llvm::bitc::METADATA_NAMESPACE, llvm::bitc::METADATA_NODE, llvm::bitc::METADATA_OBJC_PROPERTY, llvm::bitc::METADATA_OLD_FN_NODE, llvm::bitc::METADATA_OLD_NODE, llvm::bitc::METADATA_STRING_OLD, llvm::bitc::METADATA_STRINGS, llvm::bitc::METADATA_SUBPROGRAM, llvm::bitc::METADATA_SUBRANGE, llvm::bitc::METADATA_SUBROUTINE_TYPE, llvm::bitc::METADATA_TEMPLATE_TYPE, llvm::bitc::METADATA_TEMPLATE_VALUE, llvm::bitc::METADATA_VALUE, llvm::BitstreamCursor::ReadCode(), llvm::BitstreamCursor::readRecord(), llvm::BitstreamEntry::Record, llvm::SmallVectorImpl< T >::reserve(), llvm::BitcodeReaderValueList::size(), llvm::SmallVectorTemplateCommon< T >::size(), llvm::AMDGPU::HSAMD::Kernel::Arg::Key::Size, llvm::BitstreamCursor::skipRecord(), and llvm::BitstreamEntry::SubBlock.


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