LLVM  7.0.0
Classes | Public Member Functions | List of all members
llvm::MetadataLoader Class Reference

Helper class that handles loading Metadatas and keeping them available. More...

#include "Bitcode/Reader/MetadataLoader.h"

Classes

class  MetadataLoaderImpl
 

Public Member Functions

 ~MetadataLoader ()
 
 MetadataLoader (BitstreamCursor &Stream, Module &TheModule, BitcodeReaderValueList &ValueList, bool IsImporting, std::function< Type *(unsigned)> getTypeByID)
 
MetadataLoader & operator= (MetadataLoader &&)
 
 MetadataLoader (MetadataLoader &&)
 
Error parseModuleMetadata ()
 
Error parseFunctionMetadata ()
 
void setStripTBAA (bool StripTBAA=true)
 Set the mode to strip TBAA metadata on load. More...
 
bool isStrippingTBAA ()
 Return true if the Loader is stripping TBAA metadata. More...
 
bool hasFwdRefs () const
 
Metadata * getMetadataFwdRefOrLoad (unsigned Idx)
 Return the given metadata, creating a replaceable forward reference if necessary. More...
 
MDNode * getMDNodeFwdRefOrNull (unsigned Idx)
 
DISubprogram * lookupSubprogramForFunction (Function *F)
 Return the DISubprogra metadata for a Function if any, null otherwise. More...
 
Error parseMetadataAttachment (Function &F, const SmallVectorImpl< Instruction *> &InstructionList)
 Parse a METADATA_ATTACHMENT block for a function. More...
 
Error parseMetadataKinds ()
 Parse a METADATA_KIND block for the current module. More...
 
unsigned size () const
 
void shrinkTo (unsigned N)
 
void upgradeDebugIntrinsics (Function &F)
 Perform bitcode upgrades on llvm.dbg.* calls. More...
 

Detailed Description

Helper class that handles loading Metadatas and keeping them available.

Definition at line 36 of file MetadataLoader.h.

Constructor & Destructor Documentation

◆ ~MetadataLoader()

MetadataLoader::~MetadataLoader ( )
default

Referenced by MetadataLoader().

◆ MetadataLoader() [1/2]

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

Definition at line 1968 of file MetadataLoader.cpp.

◆ MetadataLoader() [2/2]

MetadataLoader::MetadataLoader ( MetadataLoader &&  RHS)

Definition at line 1964 of file MetadataLoader.cpp.

References ~MetadataLoader().

Member Function Documentation

◆ getMDNodeFwdRefOrNull()

MDNode * MetadataLoader::getMDNodeFwdRefOrNull ( unsigned  Idx)

Definition at line 1987 of file MetadataLoader.cpp.

Referenced by parseFunctionMetadata().

◆ getMetadataFwdRefOrLoad()

Metadata * MetadataLoader::getMetadataFwdRefOrLoad ( unsigned  Idx)

Return the given metadata, creating a replaceable forward reference if necessary.

Definition at line 1983 of file MetadataLoader.cpp.

Referenced by parseFunctionMetadata(), and readTriple().

◆ hasFwdRefs()

bool MetadataLoader::hasFwdRefs ( ) const

Definition at line 1979 of file MetadataLoader.cpp.

Referenced by parseFunctionMetadata().

◆ isStrippingTBAA()

bool MetadataLoader::isStrippingTBAA ( )

Return true if the Loader is stripping TBAA metadata.

Definition at line 2008 of file MetadataLoader.cpp.

Referenced by parseFunctionMetadata().

◆ lookupSubprogramForFunction()

DISubprogram * MetadataLoader::lookupSubprogramForFunction ( Function *  F)

Return the DISubprogra metadata for a Function if any, null otherwise.

Definition at line 1991 of file MetadataLoader.cpp.

Referenced by parseFunctionMetadata().

◆ operator=()

MetadataLoader & MetadataLoader::operator= ( MetadataLoader &&  RHS)

Definition at line 1960 of file MetadataLoader.cpp.

◆ parseFunctionMetadata()

Error llvm::MetadataLoader::parseFunctionMetadata ( )
inline

◆ parseMetadataAttachment()

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

Parse a METADATA_ATTACHMENT block for a function.

Definition at line 1995 of file MetadataLoader.cpp.

Referenced by parseFunctionMetadata().

◆ parseMetadataKinds()

Error MetadataLoader::parseMetadataKinds ( )

Parse a METADATA_KIND block for the current module.

Definition at line 2000 of file MetadataLoader.cpp.

Referenced by parseFunctionMetadata().

◆ parseModuleMetadata()

Error llvm::MetadataLoader::parseModuleMetadata ( )
inline

Definition at line 50 of file MetadataLoader.h.

◆ setStripTBAA()

void MetadataLoader::setStripTBAA ( bool  StripTBAA = true)

Set the mode to strip TBAA metadata on load.

Definition at line 2004 of file MetadataLoader.cpp.

Referenced by parseFunctionMetadata().

◆ shrinkTo()

void MetadataLoader::shrinkTo ( unsigned  N)

Definition at line 2011 of file MetadataLoader.cpp.

Referenced by parseFunctionMetadata().

◆ size()

unsigned MetadataLoader::size ( ) const

Definition at line 2010 of file MetadataLoader.cpp.

Referenced by parseFunctionMetadata().

◆ upgradeDebugIntrinsics()

void MetadataLoader::upgradeDebugIntrinsics ( Function &  F)

Perform bitcode upgrades on llvm.dbg.* calls.

Definition at line 2013 of file MetadataLoader.cpp.

Referenced by parseFunctionMetadata().


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