Movatterモバイル変換


[0]ホーム

URL:


LLVM 20.0.0git
Classes |Public Member Functions |List of all members
llvm::Module Class Reference

AModule instance is used to store all the information related to an LLVM module.More...

#include "llvm/IR/Module.h"

Classes

class  debug_compile_units_iterator
 An iterator for DICompileUnits that skips those marked NoDebug.More...
 
struct  ModuleFlagEntry
 

Public Member Functions

void dropTriviallyDeadConstantArrays ()
 Destroy ConstantArrays inLLVMContext if they are not used.
 
bool getSemanticInterposition ()const
 Returns whether semantic interposition is to be respected.
 
void setSemanticInterposition (bool)
 Set whether semantic interposition is to be respected.
 
bool getRtLibUseGOT ()const
 Returns true if PLT should be avoided for RTLib calls.
 
void setRtLibUseGOT ()
 Set that PLT should be avoid for RTLib calls.
 
bool getDirectAccessExternalData ()const
 Get/set whether referencing global variables can use direct access relocations onELF targets.
 
void setDirectAccessExternalData (boolValue)
 
UWTableKind getUwtable ()const
 Get/set whether synthesized functions should get the uwtable attribute.
 
void setUwtable (UWTableKind Kind)
 
FramePointerKind getFramePointer ()const
 Get/set whether synthesized functions should get the "frame-pointer" attribute.
 
void setFramePointer (FramePointerKind Kind)
 
StringRef getStackProtectorGuard ()const
 Get/set what kind of stack protector guard to use.
 
void setStackProtectorGuard (StringRef Kind)
 
StringRef getStackProtectorGuardReg ()const
 Get/set which register to use as the stack protector guard register.
 
void setStackProtectorGuardReg (StringRefReg)
 
StringRef getStackProtectorGuardSymbol ()const
 Get/set a symbol to use as the stack protector guard.
 
void setStackProtectorGuardSymbol (StringRef Symbol)
 
int getStackProtectorGuardOffset ()const
 Get/set what offset from the stack protector to use.
 
void setStackProtectorGuardOffset (intOffset)
 
unsigned getOverrideStackAlignment ()const
 Get/set the stack alignment overridden from the default.
 
void setOverrideStackAlignment (unsignedAlign)
 
unsigned getMaxTLSAlignment ()const
 
void setOwnedMemoryBuffer (std::unique_ptr<MemoryBuffer > MB)
 Take ownership of the given memory buffer.
 
void setPartialSampleProfileRatio (constModuleSummaryIndex &Index)
 Set the partial sample profile ratio in the profile summary module flag, if applicable.
 
StringRef getDarwinTargetVariantTriple ()const
 Get the target variant triple which is a string describing a variant of the target host platform.
 
void setDarwinTargetVariantTriple (StringRefT)
 Set the target variant triple which is a string describing a variant of the target host platform.
 
VersionTuple getDarwinTargetVariantSDKVersion ()const
 Get the target variant version build SDK version metadata.
 
void setDarwinTargetVariantSDKVersion (VersionTupleVersion)
 Set the target variant version build SDK version metadata.
 
Module Level Accessors
const std::string & getModuleIdentifier ()const
 Get the module identifier which is, essentially, the name of the module.
 
unsigned getInstructionCount ()const
 Returns the number of non-debug IR instructions in the module.
 
const std::string & getSourceFileName ()const
 Get the module's original source file name.
 
StringRef getName ()const
 Get a short "name" for the module.
 
const std::string & getDataLayoutStr ()const
 Get the data layout string for the module's target platform.
 
constDataLayoutgetDataLayout ()const
 Get the data layout for the module's target platform.
 
const std::string & getTargetTriple ()const
 Get the target triple which is a string describing the target host.
 
LLVMContextgetContext ()const
 Get the global data context.
 
const std::string & getModuleInlineAsm ()const
 Get any module-scope inline assembly blocks.
 
std::unique_ptr<RandomNumberGeneratorcreateRNG (constStringRefName)const
 Get aRandomNumberGenerator salted for use with this module.
 
bool shouldEmitInstrCountChangedRemark ()
 Return true if size-info optimization remark is enabled, false otherwise.
 
Module Level Mutators
void setModuleIdentifier (StringRefID)
 Set the module identifier.
 
void setSourceFileName (StringRefName)
 Set the module's original source file name.
 
void setDataLayout (StringRefDesc)
 Set the data layout.
 
void setDataLayout (constDataLayout &Other)
 
void setTargetTriple (StringRefT)
 Set the target triple.
 
void setModuleInlineAsm (StringRef Asm)
 Set the module-scope inline assembly blocks.
 
void appendModuleInlineAsm (StringRef Asm)
 Append to the module-scope inline assembly blocks.
 
Generic Value Accessors
GlobalValuegetNamedValue (StringRefName)const
 Return the global value in the module with the specified name, of arbitrary type.
 
unsigned getNumNamedValues ()const
 Return the number of global values in the module.
 
unsigned getMDKindID (StringRefName)const
 Return a unique non-zero ID for the specified metadata kind.
 
void getMDKindNames (SmallVectorImpl<StringRef > &Result)const
 Populate client suppliedSmallVector with the name for custom metadata IDs registered in thisLLVMContext.
 
void getOperandBundleTags (SmallVectorImpl<StringRef > &Result)const
 Populate client suppliedSmallVector with the bundle tags registered in thisLLVMContext.
 
std::vector<StructType * > getIdentifiedStructTypes ()const
 
std::string getUniqueIntrinsicName (StringRef BaseName,Intrinsic::ID Id,constFunctionType *Proto)
 Return a unique name for an intrinsic whose mangling is based on an unnamed type.
 
Function Accessors
FunctionCallee getOrInsertFunction (StringRefName,FunctionType *T,AttributeListAttributeList)
 Look up the specified function in the module symbol table.
 
FunctionCallee getOrInsertFunction (StringRefName,FunctionType *T)
 
template<typename... ArgsTy>
FunctionCallee getOrInsertFunction (StringRefName,AttributeListAttributeList,Type *RetTy, ArgsTy... Args)
 Same as above, but takes a list of function arguments, which makes it easier for clients to use.
 
template<typename... ArgsTy>
FunctionCallee getOrInsertFunction (StringRefName,Type *RetTy, ArgsTy... Args)
 Same as above, but without the attributes.
 
template<typename... ArgsTy>
FunctionCallee getOrInsertFunction (StringRefName,AttributeListAttributeList,FunctionType *Invalid, ArgsTy... Args)=delete
 
FunctiongetFunction (StringRefName)const
 Look up the specified function in the module symbol table.
 
Global Variable Accessors
GlobalVariablegetGlobalVariable (StringRefName)const
 Look up the specified global variable in the module symbol table.
 
GlobalVariablegetGlobalVariable (StringRefName,bool AllowInternal)const
 getGlobalVariable - Look up the specified global variable in the module symbol table.
 
GlobalVariablegetGlobalVariable (StringRefName,bool AllowInternal=false)
 
constGlobalVariablegetNamedGlobal (StringRefName)const
 Return the global variable in the module with the specified name, of arbitrary type.
 
GlobalVariablegetNamedGlobal (StringRefName)
 
ConstantgetOrInsertGlobal (StringRefName,Type *Ty,function_ref<GlobalVariable *()> CreateGlobalCallback)
 Look up the specified global in the module symbol table.
 
ConstantgetOrInsertGlobal (StringRefName,Type *Ty)
 Look up the specified global in the module symbol table.
 
Global Alias Accessors
GlobalAliasgetNamedAlias (StringRefName)const
 Return the global alias in the module with the specified name, of arbitrary type.
 
Global IFunc Accessors
GlobalIFuncgetNamedIFunc (StringRefName)const
 Return the global ifunc in the module with the specified name, of arbitrary type.
 
Named Metadata Accessors
NamedMDNodegetNamedMetadata (StringRefName)const
 Return the firstNamedMDNode in the module with the specified name.
 
NamedMDNodegetOrInsertNamedMetadata (StringRefName)
 Return the namedMDNode in the module with the specified name.
 
void eraseNamedMetadata (NamedMDNode *NMD)
 Remove the givenNamedMDNode from this module and delete it.
 
Comdat Accessors
ComdatgetOrInsertComdat (StringRefName)
 Return theComdat in the module with the specified name.
 
Module Flags Accessors
void getModuleFlagsMetadata (SmallVectorImpl<ModuleFlagEntry > &Flags)const
 Returns the module flags in the provided vector.
 
MetadatagetModuleFlag (StringRef Key)const
 Return the corresponding value if Key appears in module flags, otherwise return null.
 
NamedMDNodegetModuleFlagsMetadata ()const
 Returns theNamedMDNode in the module that represents module-level flags.
 
NamedMDNodegetOrInsertModuleFlagsMetadata ()
 Returns theNamedMDNode in the module that represents module-level flags.
 
void addModuleFlag (ModFlagBehavior Behavior,StringRef Key,Metadata *Val)
 Add a module-level flag to the module-level flags metadata.
 
void addModuleFlag (ModFlagBehavior Behavior,StringRef Key,Constant *Val)
 
void addModuleFlag (ModFlagBehavior Behavior,StringRef Key,uint32_t Val)
 
void addModuleFlag (MDNode *Node)
 
void setModuleFlag (ModFlagBehavior Behavior,StringRef Key,Metadata *Val)
 Like addModuleFlag but replaces the old module flag if it already exists.
 
void setModuleFlag (ModFlagBehavior Behavior,StringRef Key,Constant *Val)
 
void setModuleFlag (ModFlagBehavior Behavior,StringRef Key,uint32_t Val)
 
Materialization
void setMaterializer (GVMaterializer *GVM)
 Sets theGVMaterializer to GVM.
 
GVMaterializergetMaterializer ()const
 Retrieves theGVMaterializer, if any, for thisModule.
 
bool isMaterialized ()const
 
llvm::Error materialize (GlobalValue *GV)
 Make sure theGlobalValue is fully read.
 
llvm::Error materializeAll ()
 Make sure all GlobalValues in thisModule are fully read and clear the Materializer.
 
llvm::Error materializeMetadata ()
 
void removeGlobalVariable (GlobalVariable *GV)
 Detach global variableGV from the list but don't delete it.
 
void eraseGlobalVariable (GlobalVariable *GV)
 Remove global variableGV from the list and delete it.
 
void insertGlobalVariable (GlobalVariable *GV)
 Insert global variableGV at the end of the global variable list and take ownership.
 
void insertGlobalVariable (GlobalListType::iterator Where,GlobalVariable *GV)
 Insert global variableGV into the global variable list beforeWhere and take ownership.
 
Global Variable Iteration
global_iterator global_begin ()
 
const_global_iterator global_begin ()const
 
global_iterator global_end ()
 
const_global_iterator global_end ()const
 
size_t global_size ()const
 
bool global_empty ()const
 
iterator_range<global_iteratorglobals ()
 
iterator_range<const_global_iteratorglobals ()const
 
Function Iteration
iterator begin ()
 
const_iterator begin ()const
 
iterator end ()
 
const_iterator end ()const
 
reverse_iterator rbegin ()
 
const_reverse_iterator rbegin ()const
 
reverse_iterator rend ()
 
const_reverse_iterator rend ()const
 
size_t size ()const
 
bool empty ()const
 
iterator_range<iteratorfunctions ()
 
iterator_range<const_iteratorfunctions ()const
 
Alias Iteration
alias_iterator alias_begin ()
 
const_alias_iterator alias_begin ()const
 
alias_iterator alias_end ()
 
const_alias_iterator alias_end ()const
 
size_t alias_size ()const
 
bool alias_empty ()const
 
iterator_range<alias_iteratoraliases ()
 
iterator_range<const_alias_iteratoraliases ()const
 
IFunc Iteration
ifunc_iterator ifunc_begin ()
 
const_ifunc_iterator ifunc_begin ()const
 
ifunc_iterator ifunc_end ()
 
const_ifunc_iterator ifunc_end ()const
 
size_t ifunc_size ()const
 
bool ifunc_empty ()const
 
iterator_range<ifunc_iteratorifuncs ()
 
iterator_range<const_ifunc_iteratorifuncs ()const
 
Named Metadata Iteration
named_metadata_iterator named_metadata_begin ()
 
const_named_metadata_iterator named_metadata_begin ()const
 
named_metadata_iterator named_metadata_end ()
 
const_named_metadata_iterator named_metadata_end ()const
 
size_t named_metadata_size ()const
 
bool named_metadata_empty ()const
 
iterator_range<named_metadata_iteratornamed_metadata ()
 
iterator_range<const_named_metadata_iteratornamed_metadata ()const
 
debug_compile_units_iterator debug_compile_units_begin ()const
 
debug_compile_units_iterator debug_compile_units_end ()const
 
iterator_range<debug_compile_units_iteratordebug_compile_units ()const
 Return an iterator for all DICompileUnits listed in thisModule's llvm.dbg.cu named metadata node and aren't explicitly marked as NoDebug.
 
Utility functions for printing and dumping Module objects
void print (raw_ostream &OS,AssemblyAnnotationWriter *AAW,bool ShouldPreserveUseListOrder=false,bool IsForDebug=false)const
 Print the module to an output stream with an optionalAssemblyAnnotationWriter.
 
void dump ()const
 Dump the module to stderr (for debugging).
 
void dropAllReferences ()
 This function causes all the subinstructions to "let go" of all references that they are maintaining.
 
Utility functions for querying Debug information.
unsigned getNumberRegisterParameters ()const
 Returns the Number ofRegister ParametersDwarf Version by checking module flags.
 
unsigned getDwarfVersion ()const
 Returns the Dwarf Version by checking module flags.
 
bool isDwarf64 ()const
 Returns the DWARF format by checking module flags.
 
unsigned getCodeViewFlag ()const
 Returns the CodeView Version by checking module flags.
 
Utility functions for querying and setting PIC level
PICLevel::Level getPICLevel ()const
 Returns the PIC level (small or large model)
 
void setPICLevel (PICLevel::Level PL)
 Set the PIC level (small or large model)
 
Utility functions for querying and setting PIE level
PIELevel::Level getPIELevel ()const
 Returns the PIE level (small or large model)
 
void setPIELevel (PIELevel::Level PL)
 Set the PIE level (small or large model)
 
Utility function for querying and setting code model
std::optional<CodeModel::ModelgetCodeModel ()const
 Returns the code model (tiny, small, kernel, medium or large model)
 
void setCodeModel (CodeModel::Model CL)
 Set the code model (tiny, small, kernel, medium or large)
 
Utility function for querying and setting the large data threshold
std::optional<uint64_tgetLargeDataThreshold ()const
 Returns the code model (tiny, small, kernel, medium or large model)
 
void setLargeDataThreshold (uint64_t Threshold)
 Set the code model (tiny, small, kernel, medium or large)
 
Utility functions for querying and setting PGO summary
void setProfileSummary (Metadata *M,ProfileSummary::Kind Kind)
 Attach profile summary metadata to this module.
 
MetadatagetProfileSummary (bool IsCS)const
 Returns profile summary metadata.
 
Utility functions for querying and setting the build SDK version
void setSDKVersion (constVersionTuple &V)
 Attach a build SDK version metadata to this module.
 
VersionTuple getSDKVersion ()const
 Get the build SDK version metadata.
 

Types And Enumerations

enum  ModFlagBehavior {
  Error = 1,Warning = 2,Require = 3,Override = 4,
  Append = 5,AppendUnique = 6,Max = 7,Min = 8,
  ModFlagBehaviorFirstVal = Error,ModFlagBehaviorLastVal = Min
}
 This enumeration defines the supported behaviors of module flags.More...
 
using GlobalListType =SymbolTableList<GlobalVariable >
 The type for the list of global variables.
 
using FunctionListType =SymbolTableList<Function >
 The type for the list of functions.
 
using AliasListType =SymbolTableList<GlobalAlias >
 The type for the list of aliases.
 
using IFuncListType =SymbolTableList<GlobalIFunc >
 The type for the list of ifuncs.
 
using NamedMDListType =ilist<NamedMDNode >
 The type for the list of named metadata.
 
using ComdatSymTabType =StringMap<Comdat >
 The type of the comdat "symbol" table.
 
using NamedMDSymTabType =StringMap<NamedMDNode * >
 The type for mapping names to named metadata.
 
using global_iterator =GlobalListType::iterator
 The Global Variable iterator.
 
using const_global_iterator =GlobalListType::const_iterator
 The Global Variable constant iterator.
 
using iterator =FunctionListType::iterator
 TheFunction iterators.
 
using const_iterator =FunctionListType::const_iterator
 TheFunction constant iterator.
 
using reverse_iterator =FunctionListType::reverse_iterator
 TheFunction reverse iterator.
 
using const_reverse_iterator =FunctionListType::const_reverse_iterator
 TheFunction constant reverse iterator.
 
using alias_iterator =AliasListType::iterator
 The Global Alias iterators.
 
using const_alias_iterator =AliasListType::const_iterator
 The Global Alias constant iterator.
 
using ifunc_iterator =IFuncListType::iterator
 The Global IFunc iterators.
 
using const_ifunc_iterator =IFuncListType::const_iterator
 The Global IFunc constant iterator.
 
using named_metadata_iterator =NamedMDListType::iterator
 The named metadata iterators.
 
using const_named_metadata_iterator =NamedMDListType::const_iterator
 The named metadata constant iterators.
 
staticbool isValidModFlagBehavior (Metadata *MD,ModFlagBehavior &MFB)
 Checks ifMetadata represents a valid ModFlagBehavior, and stores the converted result in MFB.
 

Convenience iterators

using global_object_iterator =concat_iterator<GlobalObject,iterator,global_iterator >
 
using const_global_object_iterator =concat_iterator<constGlobalObject,const_iterator,const_global_iterator >
 
using global_value_iterator =concat_iterator<GlobalValue,iterator,global_iterator,alias_iterator,ifunc_iterator >
 
using const_global_value_iterator =concat_iterator<constGlobalValue,const_iterator,const_global_iterator,const_alias_iterator,const_ifunc_iterator >
 
iterator_range<global_object_iteratorglobal_objects ()
 
iterator_range<const_global_object_iteratorglobal_objects ()const
 
iterator_range<global_value_iteratorglobal_values ()
 
iterator_range<const_global_value_iteratorglobal_values ()const
 

Member Variables

class Constant
 

Direct access to the globals list, functions list, and symbol table

class llvm::SymbolTableListTraits< llvm::GlobalVariable >
 
class llvm::SymbolTableListTraits< llvm::GlobalAlias >
 
class llvm::SymbolTableListTraits< llvm::GlobalIFunc >
 
staticFunctionListType Module::* getSublistAccess (Function *)
 
constFunctionListTypegetFunctionList ()const
 Get theModule's list of functions (constant).
 
FunctionListTypegetFunctionList ()
 Get theModule's list of functions.
 
void removeAlias (GlobalAlias *Alias)
 DetachAlias from the list but don't delete it.
 
void eraseAlias (GlobalAlias *Alias)
 RemoveAlias from the list and delete it.
 
void insertAlias (GlobalAlias *Alias)
 InsertAlias at the end of the alias list and take ownership.
 
void removeIFunc (GlobalIFunc *IFunc)
 DetachIFunc from the list but don't delete it.
 
void eraseIFunc (GlobalIFunc *IFunc)
 RemoveIFunc from the list and delete it.
 
void insertIFunc (GlobalIFunc *IFunc)
 InsertIFunc at the end of the alias list and take ownership.
 
void removeNamedMDNode (NamedMDNode *MDNode)
 DetachMDNode from the list but don't delete it.
 
void eraseNamedMDNode (NamedMDNode *MDNode)
 RemoveMDNode from the list and delete it.
 
void insertNamedMDNode (NamedMDNode *MDNode)
 InsertMDNode at the end of the alias list and take ownership.
 
constValueSymbolTablegetValueSymbolTable ()const
 Get the symbol table of global variable and function identifiers.
 
ValueSymbolTablegetValueSymbolTable ()
 Get theModule's symbol table of global variable and function identifiers.
 
constComdatSymTabTypegetComdatSymbolTable ()const
 Get theModule's symbol table for COMDATs (constant).
 
ComdatSymTabTypegetComdatSymbolTable ()
 Get theModule's symbol table for COMDATs.
 

Constructors

bool IsNewDbgInfoFormat
 Is thisModule using intrinsics to record the position of debugging information, or non-intrinsic records? See IsNewDbgInfoFormat inBasicBlock.
 
void removeDebugIntrinsicDeclarations ()
 Used when printing this module in the new debug info format; removes all declarations of debug intrinsics that are replaced by non-intrinsic records in the new format.
 
void convertToNewDbgValues ()
 
void convertFromNewDbgValues ()
 
void setIsNewDbgInfoFormat (bool UseNewFormat)
 
void setNewDbgInfoFormatFlag (bool NewFlag)
 
 Module (StringRef ModuleID,LLVMContext &C)
 TheModule constructor.
 
 ~Module ()
 The module destructor. This will dropAllReferences.
 
Moduleoperator= (Module &&Other)
 Move assignment.
 

Detailed Description

AModule instance is used to store all the information related to an LLVM module.

Modules are the top level container of all other LLVM Intermediate Representation (IR) objects. Each module directly contains a list of globals variables, a list of functions, a list of libraries (or other modules) this module depends on, a symbol table, and various data about the target's characteristics.

A module maintains a GlobalList object that is used to hold all constant references to global variables in the module. When a global variable is destroyed, it should have no entries in the GlobalList. The main container class for the LLVM Intermediate Representation.

Definition at line65 of fileModule.h.

Member Typedef Documentation

◆ alias_iterator

usingllvm::Module::alias_iterator =AliasListType::iterator

The Global Alias iterators.

Definition at line100 of fileModule.h.

◆ AliasListType

usingllvm::Module::AliasListType =SymbolTableList<GlobalAlias>

The type for the list of aliases.

Definition at line74 of fileModule.h.

◆ ComdatSymTabType

usingllvm::Module::ComdatSymTabType =StringMap<Comdat>

The type of the comdat "symbol" table.

Definition at line80 of fileModule.h.

◆ const_alias_iterator

usingllvm::Module::const_alias_iterator =AliasListType::const_iterator

The Global Alias constant iterator.

Definition at line102 of fileModule.h.

◆ const_global_iterator

usingllvm::Module::const_global_iterator =GlobalListType::const_iterator

The Global Variable constant iterator.

Definition at line87 of fileModule.h.

◆ const_global_object_iterator

usingllvm::Module::const_global_object_iterator =concat_iterator<constGlobalObject,const_iterator,const_global_iterator>

Definition at line773 of fileModule.h.

◆ const_global_value_iterator

usingllvm::Module::const_global_value_iterator =concat_iterator<constGlobalValue,const_iterator,const_global_iterator,const_alias_iterator,const_ifunc_iterator>

Definition at line783 of fileModule.h.

◆ const_ifunc_iterator

usingllvm::Module::const_ifunc_iterator =IFuncListType::const_iterator

The Global IFunc constant iterator.

Definition at line107 of fileModule.h.

◆ const_iterator

usingllvm::Module::const_iterator =FunctionListType::const_iterator

TheFunction constant iterator.

Definition at line92 of fileModule.h.

◆ const_named_metadata_iterator

usingllvm::Module::const_named_metadata_iterator =NamedMDListType::const_iterator

The named metadata constant iterators.

Definition at line112 of fileModule.h.

◆ const_reverse_iterator

usingllvm::Module::const_reverse_iterator =FunctionListType::const_reverse_iterator

TheFunction constant reverse iterator.

Definition at line97 of fileModule.h.

◆ FunctionListType

usingllvm::Module::FunctionListType =SymbolTableList<Function>

The type for the list of functions.

Definition at line72 of fileModule.h.

◆ global_iterator

usingllvm::Module::global_iterator =GlobalListType::iterator

The Global Variable iterator.

Definition at line85 of fileModule.h.

◆ global_object_iterator

usingllvm::Module::global_object_iterator =concat_iterator<GlobalObject,iterator,global_iterator>

Definition at line771 of fileModule.h.

◆ global_value_iterator

usingllvm::Module::global_value_iterator =concat_iterator<GlobalValue,iterator,global_iterator,alias_iterator,ifunc_iterator>

Definition at line780 of fileModule.h.

◆ GlobalListType

usingllvm::Module::GlobalListType =SymbolTableList<GlobalVariable>

The type for the list of global variables.

Definition at line70 of fileModule.h.

◆ ifunc_iterator

usingllvm::Module::ifunc_iterator =IFuncListType::iterator

The Global IFunc iterators.

Definition at line105 of fileModule.h.

◆ IFuncListType

usingllvm::Module::IFuncListType =SymbolTableList<GlobalIFunc>

The type for the list of ifuncs.

Definition at line76 of fileModule.h.

◆ iterator

usingllvm::Module::iterator =FunctionListType::iterator

TheFunction iterators.

Definition at line90 of fileModule.h.

◆ named_metadata_iterator

usingllvm::Module::named_metadata_iterator =NamedMDListType::iterator

The named metadata iterators.

Definition at line110 of fileModule.h.

◆ NamedMDListType

usingllvm::Module::NamedMDListType =ilist<NamedMDNode>

The type for the list of named metadata.

Definition at line78 of fileModule.h.

◆ NamedMDSymTabType

usingllvm::Module::NamedMDSymTabType =StringMap<NamedMDNode *>

The type for mapping names to named metadata.

Definition at line82 of fileModule.h.

◆ reverse_iterator

usingllvm::Module::reverse_iterator =FunctionListType::reverse_iterator

TheFunction reverse iterator.

Definition at line95 of fileModule.h.

Member Enumeration Documentation

◆ ModFlagBehavior

enumllvm::Module::ModFlagBehavior

This enumeration defines the supported behaviors of module flags.

Enumerator
Error 

Emits an error if two values disagree, otherwise the resulting value is that of the operands.

Warning 

Emits a warning if two values disagree.

The result value will be the operand for the flag from the first module being linked.

Require 

Adds a requirement that another module flag be present and have a specified value after linking is performed.

The value must be a metadata pair, where the first element of the pair is the ID of the module flag to be restricted, and the second element of the pair is the value the module flag should be restricted to. This behavior can be used to restrict the allowable results (via triggering of an error) of linking IDs with theOverride behavior.

Override 

Uses the specified value, regardless of the behavior or value of the other module.

If both modules specifyOverride, but the values differ, an error will be emitted.

Append 

Appends the two values, which are required to be metadata nodes.

AppendUnique 

Appends the two values, which are required to be metadata nodes.

However, duplicate entries in the second list are dropped during the append operation.

Max 

Takes the max of the two values, which are required to be integers.

Min 

Takes the min of the two values, which are required to be integers.

ModFlagBehaviorFirstVal 
ModFlagBehaviorLastVal 

Definition at line115 of fileModule.h.

Constructor & Destructor Documentation

◆ Module()

Module::Module(StringRef ModuleID,
LLVMContextC 
)
explicit

TheModule constructor.

Note that there is no default constructor. You must provide a name for the module upon construction.

Definition at line73 of fileModule.cpp.

◆ ~Module()

Module::~Module()

The module destructor. This will dropAllReferences.

Definition at line115 of fileModule.cpp.

Member Function Documentation

◆ addModuleFlag()[1/4]

void Module::addModuleFlag(MDNodeNode)

Definition at line394 of fileModule.cpp.

◆ addModuleFlag()[2/4]

void Module::addModuleFlag(ModFlagBehavior Behavior,
StringRef Key,
ConstantVal 
)

Definition at line385 of fileModule.cpp.

◆ addModuleFlag()[3/4]

void Module::addModuleFlag(ModFlagBehavior Behavior,
StringRef Key,
MetadataVal 
)

Add a module-level flag to the module-level flags metadata.

addModuleFlag - Add a module-level flag to the module-level flags metadata.

It will create the module-level flags named metadata if it doesn't already exist.

Definition at line377 of fileModule.cpp.

◆ addModuleFlag()[4/4]

void Module::addModuleFlag(ModFlagBehavior Behavior,
StringRef Key,
uint32_t Val 
)

Definition at line389 of fileModule.cpp.

◆ alias_begin()[1/2]

alias_iterator llvm::Module::alias_begin()
inline

Definition at line735 of fileModule.h.

Referenced byLLVMGetPreviousGlobalAlias().

◆ alias_begin()[2/2]

const_alias_iterator llvm::Module::alias_begin() const
inline

Definition at line736 of fileModule.h.

◆ alias_empty()

bool llvm::Module::alias_empty() const
inline

Definition at line740 of fileModule.h.

◆ alias_end()[1/2]

alias_iterator llvm::Module::alias_end()
inline

Definition at line737 of fileModule.h.

Referenced byLLVMGetNextGlobalAlias().

◆ alias_end()[2/2]

const_alias_iterator llvm::Module::alias_end() const
inline

Definition at line738 of fileModule.h.

◆ alias_size()

size_t llvm::Module::alias_size() const
inline

Definition at line739 of fileModule.h.

◆ aliases()[1/2]

iterator_range<alias_iterator > llvm::Module::aliases()
inline

Definition at line742 of fileModule.h.

Referencesllvm::make_range().

Referenced byllvm::sandboxir::Context::createModule(), andllvm::thinLTOFinalizeInModule().

◆ aliases()[2/2]

iterator_range<const_alias_iterator > llvm::Module::aliases() const
inline

Definition at line745 of fileModule.h.

Referencesllvm::make_range().

◆ appendModuleInlineAsm()

void llvm::Module::appendModuleInlineAsm(StringRef Asm)
inline

Append to the module-scope inline assembly blocks.

A trailing newline is added if the input doesn't have one.

Definition at line353 of fileModule.h.

◆ begin()[1/2]

iterator llvm::Module::begin()
inline

Definition at line713 of fileModule.h.

◆ begin()[2/2]

const_iterator llvm::Module::begin() const
inline

Definition at line714 of fileModule.h.

◆ convertFromNewDbgValues()

void llvm::Module::convertFromNewDbgValues()
inline
See also
BasicBlock::convertFromNewDbgValues.

Definition at line233 of fileModule.h.

ReferencesF.

◆ convertToNewDbgValues()

void llvm::Module::convertToNewDbgValues()
inline
See also
BasicBlock::convertToNewDbgValues.

Definition at line225 of fileModule.h.

ReferencesF.

◆ createRNG()

std::unique_ptr<RandomNumberGenerator > Module::createRNG(constStringRef Name) const

Get aRandomNumberGenerator salted for use with this module.

The RNG can be seeded via -rng-seed=<uint64> and is salted with the ModuleID and the provided pass salt. The returned RNG should not be shared across threads or passes.

A unique RNG per pass ensures a reproducible random stream even when other randomness consuming passes are added or removed. In addition, the random stream will be reproducible across LLVM versions when the pass does not change.

Definition at line148 of fileModule.cpp.

◆ debug_compile_units()

iterator_range<debug_compile_units_iterator > llvm::Module::debug_compile_units() const
inline

Return an iterator for all DICompileUnits listed in thisModule's llvm.dbg.cu named metadata node and aren't explicitly marked as NoDebug.

Definition at line870 of fileModule.h.

Referencesllvm::make_range().

Referenced byllvm::MachineFunction::needsFrameMoves().

◆ debug_compile_units_begin()

debug_compile_units_iterator llvm::Module::debug_compile_units_begin() const
inline

Definition at line857 of fileModule.h.

◆ debug_compile_units_end()

debug_compile_units_iterator llvm::Module::debug_compile_units_end() const
inline

Definition at line862 of fileModule.h.

◆ dropAllReferences()

void Module::dropAllReferences()

This function causes all the subinstructions to "let go" of all references that they are maintaining.

This allows one to 'delete' a whole class at a time, even though there may be circular references... first all references are dropped, and all use counts go to zero. Then everything is delete'd for real. Note that no operations are valid on an object that has "dropped all references", except operator delete.

Definition at line563 of fileModule.cpp.

◆ dropTriviallyDeadConstantArrays()

void Module::dropTriviallyDeadConstantArrays()

Destroy ConstantArrays inLLVMContext if they are not used.

ConstantArrays constructed during linking can cause quadratic memory explosion. Releasing all unused constants can cause a 20% LTO compile-time slowdown for a large application.

NOTE: Constants are currently owned byLLVMContext. This can then only be called where all uses of theLLVMContext are understood.

Definition at line173 of fileLLVMContextImpl.cpp.

Referencesllvm::LLVMContextImpl::dropTriviallyDeadConstantArrays(), andllvm::LLVMContext::pImpl.

Referenced byllvm::IRMover::move().

◆ dump()

void Module::dump() const

Dump the module to stderr (for debugging).

Definition at line5323 of fileAsmWriter.cpp.

Referencesllvm::dbgs(), andprint().

◆ empty()

bool llvm::Module::empty() const
inline

Definition at line722 of fileModule.h.

◆ end()[1/2]

iterator llvm::Module::end()
inline

Definition at line715 of fileModule.h.

◆ end()[2/2]

const_iterator llvm::Module::end() const
inline

Definition at line716 of fileModule.h.

◆ eraseAlias()

void llvm::Module::eraseAlias(GlobalAliasAlias)
inline

RemoveAlias from the list and delete it.

Definition at line624 of fileModule.h.

Referenced byllvm::GlobalAlias::eraseFromParent().

◆ eraseGlobalVariable()

void llvm::Module::eraseGlobalVariable(GlobalVariableGV)
inline

Remove global variableGV from the list and delete it.

Definition at line583 of fileModule.h.

Referenced byllvm::GlobalVariable::eraseFromParent().

◆ eraseIFunc()

void llvm::Module::eraseIFunc(GlobalIFuncIFunc)
inline

RemoveIFunc from the list and delete it.

Definition at line633 of fileModule.h.

Referenced byllvm::GlobalIFunc::eraseFromParent().

◆ eraseNamedMDNode()

void llvm::Module::eraseNamedMDNode(NamedMDNodeMDNode)
inline

RemoveMDNode from the list and delete it.

Definition at line642 of fileModule.h.

◆ eraseNamedMetadata()

void Module::eraseNamedMetadata(NamedMDNodeNMD)

Remove the givenNamedMDNode from this module and delete it.

eraseNamedMetadata - Remove the givenNamedMDNode from this module and delete it.

Definition at line318 of fileModule.cpp.

Referenced byllvm::NamedMDNode::eraseFromParent().

◆ functions()[1/2]

iterator_range<iterator > llvm::Module::functions()
inline

Definition at line724 of fileModule.h.

Referencesllvm::make_range().

◆ functions()[2/2]

iterator_range<const_iterator > llvm::Module::functions() const
inline

Definition at line727 of fileModule.h.

Referencesllvm::make_range().

◆ getCodeModel()

std::optional<CodeModel::Model > Module::getCodeModel() const

Returns the code model (tiny, small, kernel, medium or large model)

Definition at line647 of fileModule.cpp.

Referenced byllvm::setGlobalVariableLargeSection().

◆ getCodeViewFlag()

unsigned Module::getCodeViewFlag() const

Returns the CodeView Version by checking module flags.

Returns zero if not present in module.

Definition at line597 of fileModule.cpp.

Referenced byllvm::X86FrameLowering::emitPrologue().

◆ getComdatSymbolTable()[1/2]

ComdatSymTabType & llvm::Module::getComdatSymbolTable()
inline

Get theModule's symbol table for COMDATs.

Definition at line689 of fileModule.h.

◆ getComdatSymbolTable()[2/2]

constComdatSymTabType & llvm::Module::getComdatSymbolTable() const
inline

Get theModule's symbol table for COMDATs (constant).

Definition at line687 of fileModule.h.

◆ getContext()

LLVMContext & llvm::Module::getContext() const
inline

Get the global data context.

Returns
LLVMContext - a container for LLVM's global information

Definition at line302 of fileModule.h.

Referenced byllvm::AMDGPUMachineModuleInfo::AMDGPUMachineModuleInfo(),llvm::AMDGPUTargetLowering::analyzeFormalArgumentsCompute(),llvm::OpenMPIRBuilder::createAtomicCompare(),llvm::OpenMPIRBuilder::createAtomicRead(),llvm::OpenMPIRBuilder::createAtomicWrite(),llvm::OpenMPIRBuilder::createCopyinClauseBlocks(),llvm::OpenMPIRBuilder::createGlobalFlag(),llvm::OpenMPIRBuilder::createLoopSkeleton(),llvm::OpenMPIRBuilder::createOffloadEntriesAndInfoMetadata(),llvm::OpenMPIRBuilder::createOffloadMapnames(),llvm::OpenMPIRBuilder::createOffloadMaptypes(),llvm::OpenMPIRBuilder::createOMPInteropDestroy(),llvm::OpenMPIRBuilder::createOMPInteropInit(),llvm::OpenMPIRBuilder::createOMPInteropUse(),llvm::OpenMPIRBuilder::createParallel(),llvm::OpenMPIRBuilder::createReductions(),llvm::OpenMPIRBuilder::createReductionsGPU(),llvm::OpenMPIRBuilder::createSections(),llvm::OpenMPIRBuilder::createTask(),crossImportIntoModule(),llvm::WebAssemblyAsmPrinter::emitGlobalVariable(),llvm::OpenMPIRBuilder::emitIfClause(),llvm::OpenMPIRBuilder::emitNonContiguousDescriptor(),llvm::OpenMPIRBuilder::emitOffloadingArraysArgument(),llvm::OpenMPIRBuilder::emitTargetTask(),llvm::OpenMPIRBuilder::emitUserDefinedMapper(),llvm::SanitizerStatReport::finish(),llvm::OpenMPIRBuilder::getOrCreateSrcLocStr(),llvm::FunctionImporter::importFunctions(),optimizeModule(),llvm::InlineAdvisorAnalysis::Result::tryCreate(),llvm::dxil::DXILOpBuilder::tryCreateOp(), andverifyLoadedModule().

◆ getDarwinTargetVariantSDKVersion()

VersionTuple Module::getDarwinTargetVariantSDKVersion() const

Get the target variant version build SDK version metadata.

An empty version is returned if no such metadata is attached.

Definition at line911 of fileModule.cpp.

◆ getDarwinTargetVariantTriple()

StringRef Module::getDarwinTargetVariantTriple() const

Get the target variant triple which is a string describing a variant of the target host platform.

For example, Mac Catalyst can be a variant target triple for a macOS target.

Returns
a string containing the target variant triple.

Definition at line900 of fileModule.cpp.

◆ getDataLayout()

constDataLayout & llvm::Module::getDataLayout() const
inline

Get the data layout for the module's target platform.

Definition at line294 of fileModule.h.

ReferencesDL.

Referenced byCanProveNotTakenFirstIteration(),llvm::OpenMPIRBuilder::createAtomicRead(),llvm::OpenMPIRBuilder::createParallel(),llvm::OpenMPIRBuilder::createReductions(),llvm::OpenMPIRBuilder::createReductionsGPU(),llvm::OpenMPIRBuilder::createTask(),llvm::OpenMPIRBuilder::emitNonContiguousDescriptor(),llvm::OpenMPIRBuilder::emitOffloadingArrays(),llvm::OpenMPIRBuilder::emitTargetKernel(),llvm::OpenMPIRBuilder::emitTargetTask(),llvm::OpenMPIRBuilder::emitUserDefinedMapper(),getAuthPtrSlotSymbolHelper(),llvm::AsmPrinter::getDataLayout(),llvm::GlobalValue::getDataLayout(),llvm::sandboxir::Module::getDataLayout(),llvm::TargetLoweringObjectFileMachO::getIndirectSymViaGOTPCRel(),llvm::OpenMPIRBuilder::getOrCreateIdent(),llvm::OpenMPIRBuilder::getOrCreateInternalVariable(),llvm::orc::IRMaterializationUnit::IRMaterializationUnit(),isAtomicRMWLegalXChgTy(),llvm::AArch64TargetLowering::lowerDeinterleaveIntrinsicToLoad(),llvm::OpenMPIRBuilder::registerTargetGlobalVariable(), andvalueCoversEntireFragment().

◆ getDataLayoutStr()

const std::string & llvm::Module::getDataLayoutStr() const
inline

Get the data layout string for the module's target platform.

This is equivalent togetDataLayout()->getStringRepresentation().

Definition at line289 of fileModule.h.

ReferencesDL.

◆ getDirectAccessExternalData()

bool Module::getDirectAccessExternalData() const

Get/set whether referencing global variables can use direct access relocations onELF targets.

Definition at line721 of fileModule.cpp.

◆ getDwarfVersion()

unsigned Module::getDwarfVersion() const

Returns the Dwarf Version by checking module flags.

Definition at line585 of fileModule.cpp.

Referenced byllvm::DwarfDebug::DwarfDebug().

◆ getFramePointer()

FramePointerKind Module::getFramePointer() const

Get/set whether synthesized functions should get the "frame-pointer" attribute.

Definition at line743 of fileModule.cpp.

◆ getFunction()

Function * Module::getFunction(StringRef Name) const

Look up the specified function in the module symbol table.

If it does not exist, return null.

Definition at line228 of fileModule.cpp.

Referenced byllvm::OpenMPIRBuilder::createTargetInit(),llvm::SelectionDAG::getSymbolFunctionGlobalAddress(),llvm::VFABI::getVectorVariantNames(), andllvm::LoopVectorizationCostModel::setVectorizedCallDecision().

◆ getFunctionList()[1/2]

FunctionListType & llvm::Module::getFunctionList()
inline

Get theModule's list of functions.

Definition at line616 of fileModule.h.

◆ getFunctionList()[2/2]

constFunctionListType & llvm::Module::getFunctionList() const
inline

Get theModule's list of functions (constant).

Definition at line614 of fileModule.h.

Referenced byllvm::OpenMPIRBuilder::finalize(),moveFunctionAdaptingType(), andllvm::CallGraph::removeFunctionFromModule().

◆ getGlobalVariable()[1/3]

GlobalVariable * llvm::Module::getGlobalVariable(StringRef Name) const
inline

Look up the specified global variable in the module symbol table.

If it does not exist, return null. If AllowInternal is set to true, this function will return types that have InternalLinkage. By default, these types are not returned.

Definition at line447 of fileModule.h.

ReferencesgetGlobalVariable(), andName.

Referenced byllvm::OpenMPIRBuilder::finalize().

◆ getGlobalVariable()[2/3]

GlobalVariable * Module::getGlobalVariable(StringRef Name,
bool AllowLocal 
) const

getGlobalVariable - Look up the specified global variable in the module symbol table.

If it does not exist, return null. The type argument should be the underlying type of the global, i.e., it should not have the top-levelPointerType, which represents the address of the global. If AllowLocal is set to true, this function will return types that have an local. By default, these types are not returned.

Definition at line243 of fileModule.cpp.

◆ getGlobalVariable()[3/3]

GlobalVariable * llvm::Module::getGlobalVariable(StringRef Name,
bool AllowInternal =false 
)
inline

Definition at line453 of fileModule.h.

ReferencesgetGlobalVariable(), andName.

◆ getIdentifiedStructTypes()

std::vector<StructType * > Module::getIdentifiedStructTypes() const

Definition at line492 of fileModule.cpp.

◆ getInstructionCount()

unsigned Module::getInstructionCount() const

Returns the number of non-debug IR instructions in the module.

This is equivalent to the sum of the IR instruction counts of each function contained in the module.

Definition at line604 of fileModule.cpp.

◆ getLargeDataThreshold()

std::optional<uint64_t > Module::getLargeDataThreshold() const

Returns the code model (tiny, small, kernel, medium or large model)

Definition at line665 of fileModule.cpp.

◆ getMaterializer()

GVMaterializer * llvm::Module::getMaterializer() const
inline

Retrieves theGVMaterializer, if any, for thisModule.

Definition at line568 of fileModule.h.

◆ getMaxTLSAlignment()

unsigned Module::getMaxTLSAlignment() const

Definition at line807 of fileModule.cpp.

◆ getMDKindID()

unsigned Module::getMDKindID(StringRef Name) const

Return a unique non-zero ID for the specified metadata kind.

getMDKindID - Return a unique non-zero ID for the specified metadata kind.

This ID is uniqued across modules in the currentLLVMContext.

Definition at line180 of fileModule.cpp.

◆ getMDKindNames()

void Module::getMDKindNames(SmallVectorImpl<StringRef > & Result) const

Populate client suppliedSmallVector with the name for custom metadata IDs registered in thisLLVMContext.

getMDKindNames - Populate client suppliedSmallVector with the name for custom metadata IDs registered in thisLLVMContext.

ID #0 is not used, so it is filled in as an empty string.

Definition at line187 of fileModule.cpp.

◆ getModuleFlag()

Metadata * Module::getModuleFlag(StringRef Key) const

Return the corresponding value if Key appears in module flags, otherwise return null.

Definition at line354 of fileModule.cpp.

Referenced byllvm::calculateSEHStateNumbers(),llvm::calculateWinCXXEHStateNumbers(), andllvm::AsmPrinter::emitFunctionBody().

◆ getModuleFlagsMetadata()[1/2]

NamedMDNode * llvm::Module::getModuleFlagsMetadata() const
inline

Returns theNamedMDNode in the module that represents module-level flags.

This method returns null if there are no module-level flags.

Definition at line537 of fileModule.h.

◆ getModuleFlagsMetadata()[2/2]

void Module::getModuleFlagsMetadata(SmallVectorImpl<ModuleFlagEntry > & Flags) const

Returns the module flags in the provided vector.

getModuleFlagsMetadata - Returns the module flags in the provided vector.

Definition at line337 of fileModule.cpp.

◆ getModuleIdentifier()

const std::string & llvm::Module::getModuleIdentifier() const
inline

Get the module identifier which is, essentially, the name of the module.

Returns
the module identifier as a string

Definition at line268 of fileModule.h.

Referenced byllvm::ThinLTOCodeGenerator::crossModuleImport(),llvm::ThinLTOCodeGenerator::emitImports(),llvm::ThinLTOCodeGenerator::gatherImportedSummariesForModule(),llvm::DOTGraphTraits< CallGraphDOTInfo * >::getGraphName(),llvm::Loop::getLocStr(),llvm::FunctionImporter::importFunctions(),llvm::ThinLTOCodeGenerator::internalize(),llvm::DiagnosticInfoIgnoringInvalidDebugMetadata::print(),llvm::PassManagerPrettyStackEntry::print(),llvm::ThinLTOCodeGenerator::promote(), andllvm::cgdata::saveModuleForTwoRounds().

◆ getModuleInlineAsm()

const std::string & llvm::Module::getModuleInlineAsm() const
inline

Get any module-scope inline assembly blocks.

Returns
a string containing the module-scope inline assembly blocks.

Definition at line306 of fileModule.h.

◆ getName()

StringRef llvm::Module::getName() const
inline

Get a short "name" for the module.

This is useful for debugging or logging. It is essentially a convenience wrapper aroundgetModuleIdentifier().

Definition at line285 of fileModule.h.

Referenced byllvm::DwarfCompileUnit::constructImportedEntityDIE(),llvm::AsmPrinter::emitStackUsage(),llvm::OpenMPIRBuilder::getOrCreateSrcLocStr(),llvm::ThinLTOCodeGenerator::run(), andllvm::FunctionSpecializer::~FunctionSpecializer().

◆ getNamedAlias()

GlobalAlias * Module::getNamedAlias(StringRef Name) const

Return the global alias in the module with the specified name, of arbitrary type.

This method returns null if a global with the specified name is not found.

Definition at line286 of fileModule.cpp.

◆ getNamedGlobal()[1/2]

GlobalVariable * llvm::Module::getNamedGlobal(StringRef Name)
inline

Definition at line465 of fileModule.h.

ReferencesName.

◆ getNamedGlobal()[2/2]

constGlobalVariable * llvm::Module::getNamedGlobal(StringRef Name) const
inline

Return the global variable in the module with the specified name, of arbitrary type.

This method returns null if a global with the specified name is not found.

Definition at line462 of fileModule.h.

ReferencesgetGlobalVariable(), andName.

Referenced byllvm::OpenMPIRBuilder::createTargetDeinit(), andllvm::TargetLowering::LowerToTLSEmulatedModel().

◆ getNamedIFunc()

GlobalIFunc * Module::getNamedIFunc(StringRef Name) const

Return the global ifunc in the module with the specified name, of arbitrary type.

This method returns null if a global with the specified name is not found.

Definition at line290 of fileModule.cpp.

◆ getNamedMetadata()

NamedMDNode * Module::getNamedMetadata(StringRef Name) const

Return the firstNamedMDNode in the module with the specified name.

getNamedMetadata - Return the firstNamedMDNode in the module with the specified name.

This method returns null if aNamedMDNode with the specified name is not found.

Definition at line297 of fileModule.cpp.

Referenced byllvm::X86FrameLowering::adjustForHiPEPrologue(),llvm::cacheAnnotationFromMD(), andllvm::OpenMPIRBuilder::loadOffloadInfoMetadata().

◆ getNamedValue()

GlobalValue * Module::getNamedValue(StringRef Name) const

Return the global value in the module with the specified name, of arbitrary type.

getNamedValue - Return the first global value in the module with the specified name, of arbitrary type.

This method returns null if a global with the specified name is not found.

Definition at line170 of fileModule.cpp.

Referenced byllvm::OpenMPIRBuilder::createOffloadEntriesAndInfoMetadata(),llvm::RecordStreamer::flushSymverDirectives(),llvm::OpenMPIRBuilder::getAddrOfDeclareTargetVar(),getComdatGVForCOFF(), andllvm::OpenMPIRBuilder::registerTargetGlobalVariable().

◆ getNumberRegisterParameters()

unsigned Module::getNumberRegisterParameters() const

Returns the Number ofRegister ParametersDwarf Version by checking module flags.

Definition at line577 of fileModule.cpp.

◆ getNumNamedValues()

unsigned Module::getNumNamedValues() const

Return the number of global values in the module.

Definition at line174 of fileModule.cpp.

◆ getOperandBundleTags()

void Module::getOperandBundleTags(SmallVectorImpl<StringRef > & Result) const

Populate client suppliedSmallVector with the bundle tags registered in thisLLVMContext.

The bundle tags are ordered by increasing bundle IDs.

See also
LLVMContext::getOperandBundleTagID

Definition at line191 of fileModule.cpp.

◆ getOrInsertComdat()

Comdat * Module::getOrInsertComdat(StringRef Name)

Return theComdat in the module with the specified name.

It is created if it didn't already exist.

Definition at line611 of fileModule.cpp.

◆ getOrInsertFunction()[1/5]

template<typename... ArgsTy>
FunctionCallee llvm::Module::getOrInsertFunction(StringRef Name,
AttributeList AttributeList,
FunctionTypeInvalid,
ArgsTy... Args 
)
delete

◆ getOrInsertFunction()[2/5]

template<typename... ArgsTy>
FunctionCallee llvm::Module::getOrInsertFunction(StringRef Name,
AttributeList AttributeList,
TypeRetTy,
ArgsTy... Args 
)
inline

Same as above, but takes a list of function arguments, which makes it easier for clients to use.

Definition at line413 of fileModule.h.

ReferencesName, andRetTy.

◆ getOrInsertFunction()[3/5]

FunctionCallee Module::getOrInsertFunction(StringRef Name,
FunctionTypeT 
)

Definition at line221 of fileModule.cpp.

◆ getOrInsertFunction()[4/5]

FunctionCallee Module::getOrInsertFunction(StringRef Name,
FunctionTypeT,
AttributeList AttributeList 
)

Look up the specified function in the module symbol table.

If it does not exist, add a prototype for the function and return it. Otherwise, return the existing function.

In all cases, the returned value is aFunctionCallee wrapper around the 'FunctionTypeT' passed in, as well as the 'Value' of theFunction. The function type of the function may differ from the function type stored inFunctionCallee if it was previously created with a different type.

Note: For library callsgetOrInsertLibFunc() should be used instead.

Definition at line204 of fileModule.cpp.

Referenced byllvm::SanitizerStatReport::finish(),InsertCall(),insertCallBeforeInstruction(), andllvm::dxil::DXILOpBuilder::tryCreateOp().

◆ getOrInsertFunction()[5/5]

template<typename... ArgsTy>
FunctionCallee llvm::Module::getOrInsertFunction(StringRef Name,
TypeRetTy,
ArgsTy... Args 
)
inline

Same as above, but without the attributes.

Definition at line424 of fileModule.h.

ReferencesName, andRetTy.

◆ getOrInsertGlobal()[1/2]

Constant * Module::getOrInsertGlobal(StringRef Name,
TypeTy 
)

Look up the specified global in the module symbol table.

If required, this overload constructs the global variable using its constructor's defaults.

Definition at line272 of fileModule.cpp.

◆ getOrInsertGlobal()[2/2]

Constant * Module::getOrInsertGlobal(StringRef Name,
TypeTy,
function_ref<GlobalVariable *()> CreateGlobalCallback 
)

Look up the specified global in the module symbol table.

getOrInsertGlobal - Look up the specified global in the module symbol table.

If it does not exist, invoke a callback to create a declaration of the global and return it. The global is constantexpr casted to the expected type if necessary.

  1. If it does not exist, add a declaration of the global and return it.
  2. Else, the global exists but has the wrong type: return the function with a constantexpr cast to the right type.
  3. Finally, if the existing global is the correct declaration, return the existing global.

Definition at line258 of fileModule.cpp.

◆ getOrInsertModuleFlagsMetadata()

NamedMDNode * Module::getOrInsertModuleFlagsMetadata()

Returns theNamedMDNode in the module that represents module-level flags.

getOrInsertModuleFlagsMetadata - Returns theNamedMDNode in the module that represents module-level flags.

If module-level flags aren't found, it creates the named metadata that contains them.

Definition at line368 of fileModule.cpp.

◆ getOrInsertNamedMetadata()

NamedMDNode * Module::getOrInsertNamedMetadata(StringRef Name)

Return the namedMDNode in the module with the specified name.

getOrInsertNamedMetadata - Return the first namedMDNode in the module with the specified name.

This method returns a newNamedMDNode if aNamedMDNode with the specified name is not found.

Definition at line304 of fileModule.cpp.

Referenced byllvm::CloneFunctionInto(),llvm::DIBuilder::createCompileUnit(), andllvm::OpenMPIRBuilder::createOffloadEntriesAndInfoMetadata().

◆ getOverrideStackAlignment()

unsigned Module::getOverrideStackAlignment() const

Get/set the stack alignment overridden from the default.

Definition at line800 of fileModule.cpp.

◆ getPICLevel()

PICLevel::Level Module::getPICLevel() const

Returns the PIC level (small or large model)

Definition at line617 of fileModule.cpp.

◆ getPIELevel()

PIELevel::Level Module::getPIELevel() const

Returns the PIE level (small or large model)

Definition at line633 of fileModule.cpp.

Referenced byllvm::TargetMachine::getTLSModel(), andProcessThinLTOModule().

◆ getProfileSummary()

Metadata * Module::getProfileSummary(bool IsCS) const

Returns profile summary metadata.

When IsCS is true, use the context sensitive profile summary.

Definition at line689 of fileModule.cpp.

Referenced byllvm::ProfileSummaryInfo::refresh().

◆ getRtLibUseGOT()

bool Module::getRtLibUseGOT() const

Returns true if PLT should be avoided for RTLib calls.

Definition at line712 of fileModule.cpp.

◆ getSDKVersion()

VersionTuple Module::getSDKVersion() const

Get the build SDK version metadata.

An empty version is returned if no such metadata is attached.

Definition at line861 of fileModule.cpp.

◆ getSemanticInterposition()

bool Module::getSemanticInterposition() const

Returns whether semantic interposition is to be respected.

Definition at line694 of fileModule.cpp.

Referenced byllvm::GlobalValue::isInterposable().

◆ getSourceFileName()

const std::string & llvm::Module::getSourceFileName() const
inline

Get the module's original source file name.

When compiling from bitcode, this is taken from a bitcode record where it was recorded. For other compiles it is the same as the ModuleID, which would contain the source file name.

Definition at line279 of fileModule.h.

Referenced byllvm::sandboxir::Module::getSourceFileName(),llvm::getStrippedSourceFileName(),llvm::FunctionImporter::importFunctions(),selectExplicitSectionGlobal(), andllvm::thinLTOInternalizeModule().

◆ getStackProtectorGuard()

StringRef Module::getStackProtectorGuard() const

Get/set what kind of stack protector guard to use.

Definition at line753 of fileModule.cpp.

◆ getStackProtectorGuardOffset()

int Module::getStackProtectorGuardOffset() const

Get/set what offset from the stack protector to use.

Definition at line789 of fileModule.cpp.

◆ getStackProtectorGuardReg()

StringRef Module::getStackProtectorGuardReg() const

Get/set which register to use as the stack protector guard register.

The empty string is equivalent to "global". Other values may be "tls" or "sysreg".

Definition at line765 of fileModule.cpp.

◆ getStackProtectorGuardSymbol()

StringRef Module::getStackProtectorGuardSymbol() const

Get/set a symbol to use as the stack protector guard.

Definition at line777 of fileModule.cpp.

◆ getSublistAccess()

staticFunctionListType Module::* llvm::Module::getSublistAccess(Function)
inlinestatic

Definition at line617 of fileModule.h.

◆ getTargetTriple()

const std::string & llvm::Module::getTargetTriple() const
inline

Get the target triple which is a string describing the target host.

Returns
a string containing the target triple.

Definition at line298 of fileModule.h.

Referenced byllvm::ModuleSymbolTable::addModule(),llvm::CodeViewDebug::beginFunctionImpl(),llvm::GlobalObject::canIncreaseAlignment(),llvm::ThinLTOCodeGenerator::crossModuleImport(),llvm::ThinLTOCodeGenerator::emitImports(),llvm::CodeViewDebug::endFunctionImpl(),llvm::ThinLTOCodeGenerator::gatherImportedSummariesForModule(),llvm::OpenMPIRBuilder::getOrCreateInternalVariable(),llvm::LTOModule::getTargetTriple(),insertSinCosCall(),llvm::ThinLTOCodeGenerator::internalize(),llvm::TargetLibraryInfoImpl::isCallingConvCCompatible(),llvm::ThinLTOCodeGenerator::optimize(), andllvm::ThinLTOCodeGenerator::promote().

◆ getUniqueIntrinsicName()

std::string Module::getUniqueIntrinsicName(StringRef BaseName,
Intrinsic::ID Id,
constFunctionTypeProto 
)

Return a unique name for an intrinsic whose mangling is based on an unnamed type.

The Proto represents the function prototype.

Definition at line506 of fileModule.cpp.

◆ getUwtable()

UWTableKind Module::getUwtable() const

Get/set whether synthesized functions should get the uwtable attribute.

Definition at line733 of fileModule.cpp.

◆ getValueSymbolTable()[1/2]

ValueSymbolTable & llvm::Module::getValueSymbolTable()
inline

Get theModule's symbol table of global variable and function identifiers.

Definition at line684 of fileModule.h.

◆ getValueSymbolTable()[2/2]

constValueSymbolTable & llvm::Module::getValueSymbolTable() const
inline

Get the symbol table of global variable and function identifiers.

Definition at line682 of fileModule.h.

◆ global_begin()[1/2]

global_iterator llvm::Module::global_begin()
inline

Definition at line695 of fileModule.h.

Referenced byLLVMGetPreviousGlobal().

◆ global_begin()[2/2]

const_global_iterator llvm::Module::global_begin() const
inline

Definition at line696 of fileModule.h.

◆ global_empty()

bool llvm::Module::global_empty() const
inline

Definition at line700 of fileModule.h.

◆ global_end()[1/2]

global_iterator llvm::Module::global_end()
inline

Definition at line697 of fileModule.h.

Referenced byLLVMGetNextGlobal().

◆ global_end()[2/2]

const_global_iterator llvm::Module::global_end() const
inline

Definition at line698 of fileModule.h.

◆ global_objects()[1/2]

iterator_range<Module::global_object_iterator > Module::global_objects()

Definition at line442 of fileModule.cpp.

Referenced byllvm::thinLTOFinalizeInModule().

◆ global_objects()[2/2]

iterator_range<Module::const_global_object_iterator > Module::global_objects() const

Definition at line446 of fileModule.cpp.

◆ global_size()

size_t llvm::Module::global_size() const
inline

Definition at line699 of fileModule.h.

◆ global_values()[1/2]

iterator_range<Module::global_value_iterator > Module::global_values()

Definition at line450 of fileModule.cpp.

Referenced byllvm::RecordStreamer::flushSymverDirectives().

◆ global_values()[2/2]

iterator_range<Module::const_global_value_iterator > Module::global_values() const

Definition at line454 of fileModule.cpp.

◆ globals()[1/2]

iterator_range<global_iterator > llvm::Module::globals()
inline

Definition at line702 of fileModule.h.

Referencesllvm::make_range().

Referenced byllvm::sandboxir::Context::createModule(),llvm::OpenMPIRBuilder::getOrCreateIdent(),llvm::OpenMPIRBuilder::getOrCreateSrcLocStr(), andllvm::thinLTOFinalizeInModule().

◆ globals()[2/2]

iterator_range<const_global_iterator > llvm::Module::globals() const
inline

Definition at line705 of fileModule.h.

Referencesllvm::make_range().

◆ ifunc_begin()[1/2]

ifunc_iterator llvm::Module::ifunc_begin()
inline

Definition at line753 of fileModule.h.

Referenced byLLVMGetPreviousGlobalIFunc().

◆ ifunc_begin()[2/2]

const_ifunc_iterator llvm::Module::ifunc_begin() const
inline

Definition at line754 of fileModule.h.

◆ ifunc_empty()

bool llvm::Module::ifunc_empty() const
inline

Definition at line758 of fileModule.h.

◆ ifunc_end()[1/2]

ifunc_iterator llvm::Module::ifunc_end()
inline

Definition at line755 of fileModule.h.

Referenced byLLVMGetNextGlobalIFunc().

◆ ifunc_end()[2/2]

const_ifunc_iterator llvm::Module::ifunc_end() const
inline

Definition at line756 of fileModule.h.

◆ ifunc_size()

size_t llvm::Module::ifunc_size() const
inline

Definition at line757 of fileModule.h.

◆ ifuncs()[1/2]

iterator_range<ifunc_iterator > llvm::Module::ifuncs()
inline

Definition at line760 of fileModule.h.

Referencesllvm::make_range().

Referenced byllvm::sandboxir::Context::createModule().

◆ ifuncs()[2/2]

iterator_range<const_ifunc_iterator > llvm::Module::ifuncs() const
inline

Definition at line763 of fileModule.h.

Referencesllvm::make_range().

◆ insertAlias()

void llvm::Module::insertAlias(GlobalAliasAlias)
inline

InsertAlias at the end of the alias list and take ownership.

Definition at line626 of fileModule.h.

◆ insertGlobalVariable()[1/2]

void llvm::Module::insertGlobalVariable(GlobalListType::iterator Where,
GlobalVariableGV 
)
inline

Insert global variableGV into the global variable list beforeWhere and take ownership.

Definition at line591 of fileModule.h.

◆ insertGlobalVariable()[2/2]

void llvm::Module::insertGlobalVariable(GlobalVariableGV)
inline

Insert global variableGV at the end of the global variable list and take ownership.

Definition at line586 of fileModule.h.

Referenced byOptimizeGlobalAddressOfAllocation(),removeGlobalCtors(), andTryToShrinkGlobalToBoolean().

◆ insertIFunc()

void llvm::Module::insertIFunc(GlobalIFuncIFunc)
inline

InsertIFunc at the end of the alias list and take ownership.

Definition at line635 of fileModule.h.

◆ insertNamedMDNode()

void llvm::Module::insertNamedMDNode(NamedMDNodeMDNode)
inline

InsertMDNode at the end of the alias list and take ownership.

Definition at line644 of fileModule.h.

◆ isDwarf64()

bool Module::isDwarf64() const

Returns the DWARF format by checking module flags.

Definition at line592 of fileModule.cpp.

Referenced byllvm::DwarfDebug::DwarfDebug().

◆ isMaterialized()

bool llvm::Module::isMaterialized() const
inline

Definition at line569 of fileModule.h.

◆ isValidModFlagBehavior()

bool Module::isValidModFlagBehavior(MetadataMD,
ModFlagBehaviorMFB 
)
static

Checks ifMetadata represents a valid ModFlagBehavior, and stores the converted result in MFB.

Definition at line325 of fileModule.cpp.

◆ materialize()

Error Module::materialize(GlobalValueGV)

Make sure theGlobalValue is fully read.

Definition at line468 of fileModule.cpp.

Referenced byllvm::GlobalValue::materialize().

◆ materializeAll()

Error Module::materializeAll()

Make sure all GlobalValues in thisModule are fully read and clear the Materializer.

Definition at line475 of fileModule.cpp.

◆ materializeMetadata()

Error Module::materializeMetadata()

Definition at line482 of fileModule.cpp.

◆ named_metadata()[1/2]

iterator_range<named_metadata_iterator > llvm::Module::named_metadata()
inline

Definition at line807 of fileModule.h.

Referencesllvm::make_range().

◆ named_metadata()[2/2]

iterator_range<const_named_metadata_iterator > llvm::Module::named_metadata() const
inline

Definition at line810 of fileModule.h.

Referencesllvm::make_range().

◆ named_metadata_begin()[1/2]

named_metadata_iterator llvm::Module::named_metadata_begin()
inline

Definition at line794 of fileModule.h.

Referenced byLLVMGetPreviousNamedMetadata().

◆ named_metadata_begin()[2/2]

const_named_metadata_iterator llvm::Module::named_metadata_begin() const
inline

Definition at line795 of fileModule.h.

◆ named_metadata_empty()

bool llvm::Module::named_metadata_empty() const
inline

Definition at line805 of fileModule.h.

◆ named_metadata_end()[1/2]

named_metadata_iterator llvm::Module::named_metadata_end()
inline

Definition at line799 of fileModule.h.

Referenced byLLVMGetNextNamedMetadata().

◆ named_metadata_end()[2/2]

const_named_metadata_iterator llvm::Module::named_metadata_end() const
inline

Definition at line800 of fileModule.h.

◆ named_metadata_size()

size_t llvm::Module::named_metadata_size() const
inline

Definition at line804 of fileModule.h.

◆ operator=()

Module & Module::operator=(Module && Other)

Move assignment.

Definition at line80 of fileModule.cpp.

◆ print()

void Module::print(raw_ostreamOS,
AssemblyAnnotationWriterAAW,
bool ShouldPreserveUseListOrder =false,
bool IsForDebug =false 
) const

Print the module to an output stream with an optionalAssemblyAnnotationWriter.

IfShouldPreserveUseListOrder, then include uselistorder directives so that use-lists can be recreated when reading the assembly.

Definition at line4912 of fileAsmWriter.cpp.

ReferencesOS.

Referenced bydump().

◆ rbegin()[1/2]

reverse_iterator llvm::Module::rbegin()
inline

Definition at line717 of fileModule.h.

◆ rbegin()[2/2]

const_reverse_iterator llvm::Module::rbegin() const
inline

Definition at line718 of fileModule.h.

◆ removeAlias()

void llvm::Module::removeAlias(GlobalAliasAlias)
inline

DetachAlias from the list but don't delete it.

Definition at line622 of fileModule.h.

Referenced byllvm::GlobalAlias::removeFromParent().

◆ removeDebugIntrinsicDeclarations()

void Module::removeDebugIntrinsicDeclarations()

Used when printing this module in the new debug info format; removes all declarations of debug intrinsics that are replaced by non-intrinsic records in the new format.

Definition at line124 of fileModule.cpp.

◆ removeGlobalVariable()

void llvm::Module::removeGlobalVariable(GlobalVariableGV)
inline

Detach global variableGV from the list but don't delete it.

Definition at line581 of fileModule.h.

Referenced byllvm::GlobalVariable::removeFromParent().

◆ removeIFunc()

void llvm::Module::removeIFunc(GlobalIFuncIFunc)
inline

DetachIFunc from the list but don't delete it.

Definition at line631 of fileModule.h.

Referenced byllvm::GlobalIFunc::removeFromParent().

◆ removeNamedMDNode()

void llvm::Module::removeNamedMDNode(NamedMDNodeMDNode)
inline

DetachMDNode from the list but don't delete it.

Definition at line640 of fileModule.h.

◆ rend()[1/2]

reverse_iterator llvm::Module::rend()
inline

Definition at line719 of fileModule.h.

◆ rend()[2/2]

const_reverse_iterator llvm::Module::rend() const
inline

Definition at line720 of fileModule.h.

◆ setCodeModel()

void Module::setCodeModel(CodeModel::Model CL)

Set the code model (tiny, small, kernel, medium or large)

Definition at line657 of fileModule.cpp.

◆ setDarwinTargetVariantSDKVersion()

void Module::setDarwinTargetVariantSDKVersion(VersionTuple Version)

Set the target variant version build SDK version metadata.

Definition at line915 of fileModule.cpp.

◆ setDarwinTargetVariantTriple()

void Module::setDarwinTargetVariantTriple(StringRef T)

Set the target variant triple which is a string describing a variant of the target host platform.

Definition at line906 of fileModule.cpp.

◆ setDataLayout()[1/2]

void Module::setDataLayout(constDataLayoutOther)

Definition at line427 of fileModule.cpp.

◆ setDataLayout()[2/2]

void Module::setDataLayout(StringRef Desc)

Set the data layout.

Definition at line425 of fileModule.cpp.

◆ setDirectAccessExternalData()

void Module::setDirectAccessExternalData(bool Value)

Definition at line729 of fileModule.cpp.

◆ setFramePointer()

void Module::setFramePointer(FramePointerKind Kind)

Definition at line749 of fileModule.cpp.

◆ setIsNewDbgInfoFormat()

void llvm::Module::setIsNewDbgInfoFormat(bool UseNewFormat)
inline

Definition at line240 of fileModule.h.

◆ setLargeDataThreshold()

void Module::setLargeDataThreshold(uint64_t Threshold)

Set the code model (tiny, small, kernel, medium or large)

Definition at line675 of fileModule.cpp.

◆ setMaterializer()

void Module::setMaterializer(GVMaterializerGVM)

Sets theGVMaterializer to GVM.

This module must not yet have a Materializer. To reset the materializer for a module that already has one, call materializeAll first. Destroying this module will destroy its materializer without materializing any more GlobalValues. Without destroying theModule, there is no way to detach or destroy a materializer without materializing all the GVs it controls, to avoid leaving orphan unmaterialized GVs.

Definition at line461 of fileModule.cpp.

◆ setModuleFlag()[1/3]

void Module::setModuleFlag(ModFlagBehavior Behavior,
StringRef Key,
ConstantVal 
)

Definition at line415 of fileModule.cpp.

◆ setModuleFlag()[2/3]

void Module::setModuleFlag(ModFlagBehavior Behavior,
StringRef Key,
MetadataVal 
)

Like addModuleFlag but replaces the old module flag if it already exists.

Definition at line403 of fileModule.cpp.

◆ setModuleFlag()[3/3]

void Module::setModuleFlag(ModFlagBehavior Behavior,
StringRef Key,
uint32_t Val 
)

Definition at line419 of fileModule.cpp.

◆ setModuleIdentifier()

void llvm::Module::setModuleIdentifier(StringRef ID)
inline

Set the module identifier.

Definition at line331 of fileModule.h.

◆ setModuleInlineAsm()

void llvm::Module::setModuleInlineAsm(StringRef Asm)
inline

Set the module-scope inline assembly blocks.

A trailing newline is added if the input doesn't have one.

Definition at line345 of fileModule.h.

◆ setNewDbgInfoFormatFlag()

void llvm::Module::setNewDbgInfoFormatFlag(bool NewFlag)
inline

Definition at line246 of fileModule.h.

ReferencesF.

◆ setOverrideStackAlignment()

void Module::setOverrideStackAlignment(unsigned Align)

Definition at line814 of fileModule.cpp.

◆ setOwnedMemoryBuffer()

void Module::setOwnedMemoryBuffer(std::unique_ptr<MemoryBufferMB)

Take ownership of the given memory buffer.

Definition at line708 of fileModule.cpp.

◆ setPartialSampleProfileRatio()

void Module::setPartialSampleProfileRatio(constModuleSummaryIndexIndex)

Set the partial sample profile ratio in the profile summary module flag, if applicable.

Definition at line880 of fileModule.cpp.

◆ setPICLevel()

void Module::setPICLevel(PICLevel::Level PL)

Set the PIC level (small or large model)

Definition at line627 of fileModule.cpp.

◆ setPIELevel()

void Module::setPIELevel(PIELevel::Level PL)

Set the PIE level (small or large model)

Definition at line643 of fileModule.cpp.

◆ setProfileSummary()

void Module::setProfileSummary(MetadataM,
ProfileSummary::Kind Kind 
)

Attach profile summary metadata to this module.

Definition at line682 of fileModule.cpp.

◆ setRtLibUseGOT()

void Module::setRtLibUseGOT()

Set that PLT should be avoid for RTLib calls.

Definition at line717 of fileModule.cpp.

◆ setSDKVersion()

void Module::setSDKVersion(constVersionTupleV)

Attach a build SDK version metadata to this module.

Definition at line832 of fileModule.cpp.

◆ setSemanticInterposition()

void Module::setSemanticInterposition(bool SI)

Set whether semantic interposition is to be respected.

Definition at line704 of fileModule.cpp.

◆ setSourceFileName()

void llvm::Module::setSourceFileName(StringRef Name)
inline

Set the module's original source file name.

Definition at line334 of fileModule.h.

ReferencesName.

◆ setStackProtectorGuard()

void Module::setStackProtectorGuard(StringRef Kind)

Definition at line760 of fileModule.cpp.

◆ setStackProtectorGuardOffset()

void Module::setStackProtectorGuardOffset(int Offset)

Definition at line796 of fileModule.cpp.

◆ setStackProtectorGuardReg()

void Module::setStackProtectorGuardReg(StringRef Reg)

Definition at line772 of fileModule.cpp.

◆ setStackProtectorGuardSymbol()

void Module::setStackProtectorGuardSymbol(StringRef Symbol)

Definition at line784 of fileModule.cpp.

◆ setTargetTriple()

void llvm::Module::setTargetTriple(StringRef T)
inline

Set the target triple.

Definition at line341 of fileModule.h.

Referenced byllvm::LTOModule::setTargetTriple().

◆ setUwtable()

void Module::setUwtable(UWTableKind Kind)

Definition at line739 of fileModule.cpp.

◆ shouldEmitInstrCountChangedRemark()

bool llvm::Module::shouldEmitInstrCountChangedRemark()
inline

Return true if size-info optimization remark is enabled, false otherwise.

Definition at line321 of fileModule.h.

◆ size()

size_t llvm::Module::size() const
inline

Definition at line721 of fileModule.h.

Friends And Related Function Documentation

◆ Constant

friend classConstant
friend

Definition at line208 of fileModule.h.

◆ llvm::SymbolTableListTraits< llvm::GlobalAlias >

friend classllvm::SymbolTableListTraits<llvm::GlobalAlias >
friend

Definition at line656 of fileModule.h.

◆ llvm::SymbolTableListTraits< llvm::GlobalIFunc >

friend classllvm::SymbolTableListTraits<llvm::GlobalIFunc >
friend

Definition at line666 of fileModule.h.

◆ llvm::SymbolTableListTraits< llvm::GlobalVariable >

friend classllvm::SymbolTableListTraits<llvm::GlobalVariable >
friend

Definition at line607 of fileModule.h.

Member Data Documentation

◆ IsNewDbgInfoFormat

bool llvm::Module::IsNewDbgInfoFormat

Is thisModule using intrinsics to record the position of debugging information, or non-intrinsic records? See IsNewDbgInfoFormat inBasicBlock.

Definition at line217 of fileModule.h.

Referenced byllvm::FastISel::fastEmitBranch(),llvm::DIBuilder::insertDbgAssign(), andllvm::UpgradeIntrinsicCall().


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

Generated on Sun Jul 20 2025 19:14:49 for LLVM by doxygen 1.9.6
[8]ページ先頭

©2009-2025 Movatter.jp