class Module

Declaration

class Module { /* full declaration omitted */ };

Declared at: llvm/include/llvm/IR/Module.h:66

Method Overview

Methods

Module(llvm::StringRef ModuleID,
       llvm::LLVMContext& C)

Description

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

Declared at: llvm/include/llvm/IR/Module.h:201

Parameters

llvm::StringRef ModuleID
llvm::LLVMContext& C

void addModuleFlag(
    llvm::Module::ModFlagBehavior Behavior,
    llvm::StringRef Key,
    llvm::Metadata* Val)

Description

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.

Declared at: llvm/include/llvm/IR/Module.h:490

Parameters

llvm::Module::ModFlagBehavior Behavior
llvm::StringRef Key
llvm::Metadata* Val

void addModuleFlag(
    llvm::Module::ModFlagBehavior Behavior,
    llvm::StringRef Key,
    llvm::Constant* Val)

Declared at: llvm/include/llvm/IR/Module.h:491

Parameters

llvm::Module::ModFlagBehavior Behavior
llvm::StringRef Key
llvm::Constant* Val

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

Declared at: llvm/include/llvm/IR/Module.h:492

Parameters

llvm::Module::ModFlagBehavior Behavior
llvm::StringRef Key
uint32_t Val

void addModuleFlag(llvm::MDNode* Node)

Declared at: llvm/include/llvm/IR/Module.h:493

Parameters

llvm::MDNode* Node

int alias_begin() const

Declared at: llvm/include/llvm/IR/Module.h:622

int alias_begin()

Declared at: llvm/include/llvm/IR/Module.h:621

bool alias_empty() const

Declared at: llvm/include/llvm/IR/Module.h:626

int alias_end() const

Declared at: llvm/include/llvm/IR/Module.h:624

int alias_end()

Declared at: llvm/include/llvm/IR/Module.h:623

size_t alias_size() const

Declared at: llvm/include/llvm/IR/Module.h:625

int aliases() const

Declared at: llvm/include/llvm/IR/Module.h:631

int aliases()

Declared at: llvm/include/llvm/IR/Module.h:628

void appendModuleInlineAsm(llvm::StringRef Asm)

Description

Append to the module-scope inline assembly blocks. A trailing newline is added if the input doesn't have one.

Declared at: llvm/include/llvm/IR/Module.h:296

Parameters

llvm::StringRef Asm

int begin()

Declared at: llvm/include/llvm/IR/Module.h:599

int begin() const

Declared at: llvm/include/llvm/IR/Module.h:600

int createRNG(const llvm::Pass* P) const

Declared at: llvm/include/llvm/IR/Module.h:260

Parameters

const llvm::Pass* P

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

Declared at: llvm/include/llvm/IR/Module.h:751

llvm::Module::debug_compile_units_iterator
debug_compile_units_begin() const

Declared at: llvm/include/llvm/IR/Module.h:738

llvm::Module::debug_compile_units_iterator
debug_compile_units_end() const

Declared at: llvm/include/llvm/IR/Module.h:743

void dropAllReferences()

Description

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.

Declared at: llvm/include/llvm/IR/Module.h:788

void dropTriviallyDeadConstantArrays()

Description

Destroy ConstantArrays in LLVMContext 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 by LLVMContext. This can then only be called where all uses of the LLVMContext are understood.

Declared at: llvm/include/llvm/IR/Module.h:766

void dump() const

Description

Dump the module to stderr (for debugging).

Declared at: llvm/include/llvm/IR/Module.h:780

bool empty() const

Declared at: llvm/include/llvm/IR/Module.h:608

int end() const

Declared at: llvm/include/llvm/IR/Module.h:602

int end()

Declared at: llvm/include/llvm/IR/Module.h:601

void eraseNamedMetadata(llvm::NamedMDNode* NMD)

Description

Remove the given NamedMDNode from this module and delete it.

Declared at: llvm/include/llvm/IR/Module.h:458

Parameters

llvm::NamedMDNode* NMD

int functions()

Declared at: llvm/include/llvm/IR/Module.h:610

int functions() const

Declared at: llvm/include/llvm/IR/Module.h:613

llvm::Module::AliasListType& getAliasList()

Description

Get the Module's list of aliases.

Declared at: llvm/include/llvm/IR/Module.h:544

const llvm::Module::AliasListType& getAliasList()
    const

Description

Get the Module's list of aliases (constant).

Declared at: llvm/include/llvm/IR/Module.h:542

Optional<CodeModel::Model> getCodeModel() const

Description

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

Declared at: llvm/include/llvm/IR/Module.h:832

unsigned int getCodeViewFlag() const

Description

Returns the CodeView Version by checking module flags. Returns zero if not present in module.

Declared at: llvm/include/llvm/IR/Module.h:803

int& getComdatSymbolTable()

Declared at: llvm/include/llvm/IR/Module.h:576

const int& getComdatSymbolTable() const

Declared at: llvm/include/llvm/IR/Module.h:574

llvm::LLVMContext& getContext() const

Description

Get the global data context.

Declared at: llvm/include/llvm/IR/Module.h:245

Returns

LLVMContext - a container for LLVM's global information

const llvm::DataLayout& getDataLayout() const

Description

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

Declared at: llvm/include/llvm/IR/Module.h:237

const std::string& getDataLayoutStr() const

Description

Get the data layout string for the module's target platform. This is equivalent to getDataLayout()->getStringRepresentation().

Declared at: llvm/include/llvm/IR/Module.h:232

unsigned int getDwarfVersion() const

Description

Returns the Dwarf Version by checking module flags.

Declared at: llvm/include/llvm/IR/Module.h:799

llvm::Function* getFunction(
    llvm::StringRef Name) const

Description

Look up the specified function in the module symbol table. If it does not exist, return null.

Declared at: llvm/include/llvm/IR/Module.h:381

Parameters

llvm::StringRef Name

llvm::Module::FunctionListType& getFunctionList()

Description

Get the Module's list of functions.

Declared at: llvm/include/llvm/IR/Module.h:536

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

Description

Get the Module's list of functions (constant).

Declared at: llvm/include/llvm/IR/Module.h:534

llvm::Module::GlobalListType& getGlobalList()

Description

Get the Module's list of global variables.

Declared at: llvm/include/llvm/IR/Module.h:527

const llvm::Module::GlobalListType&
getGlobalList() const

Description

Get the Module's list of global variables (constant).

Declared at: llvm/include/llvm/IR/Module.h:525

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

Declared at: llvm/include/llvm/IR/Module.h:397

Parameters

llvm::StringRef Name
bool AllowInternal = false

llvm::GlobalVariable* getGlobalVariable(
    llvm::StringRef Name,
    bool AllowInternal) const

Declared at: llvm/include/llvm/IR/Module.h:395

Parameters

llvm::StringRef Name
bool AllowInternal

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

Description

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.

Declared at: llvm/include/llvm/IR/Module.h:391

Parameters

llvm::StringRef Name

llvm::Module::IFuncListType& getIFuncList()

Description

Get the Module's list of ifuncs.

Declared at: llvm/include/llvm/IR/Module.h:553

const llvm::Module::IFuncListType& getIFuncList()
    const

Description

Get the Module's list of ifuncs (constant).

Declared at: llvm/include/llvm/IR/Module.h:551

int getIdentifiedStructTypes() const

Declared at: llvm/include/llvm/IR/Module.h:328

unsigned int getInstructionCount()

Description

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.

Declared at: llvm/include/llvm/IR/Module.h:216

unsigned int getMDKindID(
    llvm::StringRef Name) const

Description

Return a unique non-zero ID for the specified metadata kind. This ID is uniqued across modules in the current LLVMContext.

Declared at: llvm/include/llvm/IR/Module.h:313

Parameters

llvm::StringRef Name

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

Description

Populate client supplied SmallVector with the name for custom metadata IDs registered in this LLVMContext.

Declared at: llvm/include/llvm/IR/Module.h:317

Parameters

SmallVectorImpl<llvm::StringRef>& Result

llvm::GVMaterializer* getMaterializer() const

Description

Retrieves the GVMaterializer, if any, for this Module.

Declared at: llvm/include/llvm/IR/Module.h:508

llvm::Metadata* getModuleFlag(
    llvm::StringRef Key) const

Description

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

Declared at: llvm/include/llvm/IR/Module.h:477

Parameters

llvm::StringRef Key

llvm::NamedMDNode* getModuleFlagsMetadata() const

Description

Returns the NamedMDNode in the module that represents module-level flags. This method returns null if there are no module-level flags.

Declared at: llvm/include/llvm/IR/Module.h:481

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

Description

Returns the module flags in the provided vector.

Declared at: llvm/include/llvm/IR/Module.h:473

Parameters

SmallVectorImpl<llvm::Module::ModuleFlagEntry>& Flags

const std::string& getModuleIdentifier() const

Description

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

Declared at: llvm/include/llvm/IR/Module.h:211

Returns

the module identifier as a string

const std::string& getModuleInlineAsm() const

Description

Get any module-scope inline assembly blocks.

Declared at: llvm/include/llvm/IR/Module.h:249

Returns

a string containing the module-scope inline assembly blocks.

llvm::StringRef getName() const

Description

Get a short "name" for the module. This is useful for debugging or logging. It is essentially a convenience wrapper around getModuleIdentifier().

Declared at: llvm/include/llvm/IR/Module.h:228

llvm::GlobalAlias* getNamedAlias(
    llvm::StringRef Name) const

Description

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.

Declared at: llvm/include/llvm/IR/Module.h:433

Parameters

llvm::StringRef Name

const llvm::GlobalVariable* getNamedGlobal(
    llvm::StringRef Name) const

Description

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.

Declared at: llvm/include/llvm/IR/Module.h:406

Parameters

llvm::StringRef Name

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

Declared at: llvm/include/llvm/IR/Module.h:409

Parameters

llvm::StringRef Name

llvm::GlobalIFunc* getNamedIFunc(
    llvm::StringRef Name) const

Description

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.

Declared at: llvm/include/llvm/IR/Module.h:442

Parameters

llvm::StringRef Name

int& getNamedMDList()

Declared at: llvm/include/llvm/IR/Module.h:562

const int& getNamedMDList() const

Declared at: llvm/include/llvm/IR/Module.h:560

llvm::NamedMDNode* getNamedMetadata(
    const llvm::Twine& Name) const

Description

Return the first NamedMDNode in the module with the specified name. This method returns null if a NamedMDNode with the specified name is not found.

Declared at: llvm/include/llvm/IR/Module.h:450

Parameters

const llvm::Twine& Name

llvm::GlobalValue* getNamedValue(
    llvm::StringRef Name) const

Description

Return the 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.

Declared at: llvm/include/llvm/IR/Module.h:309

Parameters

llvm::StringRef Name

unsigned int getNumberRegisterParameters() const

Description

Returns the Number of Register ParametersDwarf Version by checking module flags.

Declared at: llvm/include/llvm/IR/Module.h:796

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

Description

Populate client supplied SmallVector with the bundle tags registered in this LLVMContext. The bundle tags are ordered by increasing bundle IDs.

Declared at: llvm/include/llvm/IR/Module.h:322

Parameters

SmallVectorImpl<llvm::StringRef>& Result

llvm::Comdat* getOrInsertComdat(
    llvm::StringRef Name)

Description

Return the Comdat in the module with the specified name. It is created if it didn't already exist.

Declared at: llvm/include/llvm/IR/Module.h:466

Parameters

llvm::StringRef Name

template <typename... ArgsTy>
llvm::FunctionCallee getOrInsertFunction(
    llvm::StringRef Name,
    llvm::AttributeList AttributeList,
    llvm::FunctionType* Invalid,
    ArgsTy... Args)

Declared at: llvm/include/llvm/IR/Module.h:376

Templates

ArgsTy

Parameters

llvm::StringRef Name
llvm::AttributeList AttributeList
llvm::FunctionType* Invalid
ArgsTy... Args

llvm::FunctionCallee getOrInsertFunction(
    llvm::StringRef Name,
    llvm::FunctionType* T,
    llvm::AttributeList AttributeList)

Description

Look up the specified function in the module symbol table. Four possibilities: 1. If it does not exist, add a prototype for the function and return it. 2. Otherwise, if the existing function has the correct prototype, return the existing function. 3. Finally, the function exists but has the wrong prototype: return the function with a constantexpr cast to the right prototype. In all cases, the returned value is a FunctionCallee wrapper around the 'FunctionType *T' passed in, as well as a 'Value*' either of the Function or the bitcast to the function.

Declared at: llvm/include/llvm/IR/Module.h:345

Parameters

llvm::StringRef Name
llvm::FunctionType* T
llvm::AttributeList AttributeList

template <typename... ArgsTy>
llvm::FunctionCallee getOrInsertFunction(
    llvm::StringRef Name,
    llvm::AttributeList AttributeList,
    llvm::Type* RetTy,
    ArgsTy... Args)

Description

Look up the specified function in the module symbol table. If it does not exist, add a prototype for the function and return it. This function guarantees to return a constant of pointer to the specified function type or a ConstantExpr BitCast of that type if the named function has a different type. This version of the method takes a list of function arguments, which makes it easier for clients to use.

Declared at: llvm/include/llvm/IR/Module.h:357

Templates

ArgsTy

Parameters

llvm::StringRef Name
llvm::AttributeList AttributeList
llvm::Type* RetTy
ArgsTy... Args

template <typename... ArgsTy>
llvm::FunctionCallee getOrInsertFunction(
    llvm::StringRef Name,
    llvm::Type* RetTy,
    ArgsTy... Args)

Description

Same as above, but without the attributes.

Declared at: llvm/include/llvm/IR/Module.h:368

Templates

ArgsTy

Parameters

llvm::StringRef Name
llvm::Type* RetTy
ArgsTy... Args

llvm::FunctionCallee getOrInsertFunction(
    llvm::StringRef Name,
    llvm::FunctionType* T)

Declared at: llvm/include/llvm/IR/Module.h:348

Parameters

llvm::StringRef Name
llvm::FunctionType* T

llvm::Constant* getOrInsertGlobal(
    llvm::StringRef Name,
    llvm::Type* Ty,
    function_ref<llvm::GlobalVariable*()>
        CreateGlobalCallback)

Description

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.

Declared at: llvm/include/llvm/IR/Module.h:419

Parameters

llvm::StringRef Name
llvm::Type* Ty
function_ref<llvm::GlobalVariable*()> CreateGlobalCallback

llvm::Constant* getOrInsertGlobal(
    llvm::StringRef Name,
    llvm::Type* Ty)

Description

Look up the specified global in the module symbol table. If required, this overload constructs the global variable using its constructor's defaults.

Declared at: llvm/include/llvm/IR/Module.h:424

Parameters

llvm::StringRef Name
llvm::Type* Ty

llvm::NamedMDNode*
getOrInsertModuleFlagsMetadata()

Description

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

Declared at: llvm/include/llvm/IR/Module.h:486

llvm::NamedMDNode* getOrInsertNamedMetadata(
    llvm::StringRef Name)

Description

Return the named MDNode in the module with the specified name. This method returns a new NamedMDNode if a NamedMDNode with the specified name is not found.

Declared at: llvm/include/llvm/IR/Module.h:455

Parameters

llvm::StringRef Name

PICLevel::Level getPICLevel() const

Description

Returns the PIC level (small or large model)

Declared at: llvm/include/llvm/IR/Module.h:810

PIELevel::Level getPIELevel() const

Description

Returns the PIE level (small or large model)

Declared at: llvm/include/llvm/IR/Module.h:821

llvm::Metadata* getProfileSummary(bool IsCS)

Description

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

Declared at: llvm/include/llvm/IR/Module.h:846

Parameters

bool IsCS

bool getRtLibUseGOT() const

Description

Returns true if PLT should be avoided for RTLib calls.

Declared at: llvm/include/llvm/IR/Module.h:850

llvm::VersionTuple getSDKVersion() const

Description

Get the build SDK version metadata. An empty version is returned if no such metadata is attached.

Declared at: llvm/include/llvm/IR/Module.h:864

const std::string& getSourceFileName() const

Description

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.

Declared at: llvm/include/llvm/IR/Module.h:222

static int llvm::Module::*getSublistAccess(
    llvm::NamedMDNode*)

Declared at: llvm/include/llvm/IR/Module.h:564

Parameters

llvm::NamedMDNode*

static llvm::Module::FunctionListType
    llvm::Module::*
    getSublistAccess(llvm::Function*)

Declared at: llvm/include/llvm/IR/Module.h:537

Parameters

llvm::Function*

static llvm::Module::AliasListType llvm::Module::*
getSublistAccess(llvm::GlobalAlias*)

Declared at: llvm/include/llvm/IR/Module.h:546

Parameters

llvm::GlobalAlias*

static llvm::Module::IFuncListType llvm::Module::*
getSublistAccess(llvm::GlobalIFunc*)

Declared at: llvm/include/llvm/IR/Module.h:555

Parameters

llvm::GlobalIFunc*

static llvm::Module::GlobalListType
    llvm::Module::*
    getSublistAccess(llvm::GlobalVariable*)

Declared at: llvm/include/llvm/IR/Module.h:529

Parameters

llvm::GlobalVariable*

const std::string& getTargetTriple() const

Description

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

Declared at: llvm/include/llvm/IR/Module.h:241

Returns

a string containing the target triple.

llvm::StructType* getTypeByName(
    llvm::StringRef Name) const

Description

Return the type with the specified name, or null if there is none by that name.

Declared at: llvm/include/llvm/IR/Module.h:326

Parameters

llvm::StringRef Name

const llvm::ValueSymbolTable&
getValueSymbolTable() const

Description

Get the symbol table of global variable and function identifiers

Declared at: llvm/include/llvm/IR/Module.h:569

llvm::ValueSymbolTable& getValueSymbolTable()

Description

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

Declared at: llvm/include/llvm/IR/Module.h:571

int global_begin()

Declared at: llvm/include/llvm/IR/Module.h:582

int global_begin() const

Declared at: llvm/include/llvm/IR/Module.h:583

bool global_empty() const

Declared at: llvm/include/llvm/IR/Module.h:586

int global_end()

Declared at: llvm/include/llvm/IR/Module.h:584

int global_end() const

Declared at: llvm/include/llvm/IR/Module.h:585

int global_objects() const

Declared at: llvm/include/llvm/IR/Module.h:664

int global_objects()

Declared at: llvm/include/llvm/IR/Module.h:663

int global_values() const

Declared at: llvm/include/llvm/IR/Module.h:674

int global_values()

Declared at: llvm/include/llvm/IR/Module.h:673

int globals() const

Declared at: llvm/include/llvm/IR/Module.h:591

int globals()

Declared at: llvm/include/llvm/IR/Module.h:588

int ifunc_begin()

Declared at: llvm/include/llvm/IR/Module.h:639

int ifunc_begin() const

Declared at: llvm/include/llvm/IR/Module.h:640

bool ifunc_empty() const

Declared at: llvm/include/llvm/IR/Module.h:644

int ifunc_end() const

Declared at: llvm/include/llvm/IR/Module.h:642

int ifunc_end()

Declared at: llvm/include/llvm/IR/Module.h:641

size_t ifunc_size() const

Declared at: llvm/include/llvm/IR/Module.h:643

int ifuncs() const

Declared at: llvm/include/llvm/IR/Module.h:649

int ifuncs()

Declared at: llvm/include/llvm/IR/Module.h:646

bool isMaterialized() const

Declared at: llvm/include/llvm/IR/Module.h:509

static bool isValidModFlagBehavior(
    llvm::Metadata* MD,
    llvm::Module::ModFlagBehavior& MFB)

Description

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

Declared at: llvm/include/llvm/IR/Module.h:155

Parameters

llvm::Metadata* MD
llvm::Module::ModFlagBehavior& MFB

llvm::Error materialize(llvm::GlobalValue* GV)

Description

Make sure the GlobalValue is fully read.

Declared at: llvm/include/llvm/IR/Module.h:512

Parameters

llvm::GlobalValue* GV

llvm::Error materializeAll()

Description

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

Declared at: llvm/include/llvm/IR/Module.h:516

llvm::Error materializeMetadata()

Declared at: llvm/include/llvm/IR/Module.h:518

int named_metadata() const

Declared at: llvm/include/llvm/IR/Module.h:696

int named_metadata()

Declared at: llvm/include/llvm/IR/Module.h:693

int named_metadata_begin() const

Declared at: llvm/include/llvm/IR/Module.h:681

int named_metadata_begin()

Declared at: llvm/include/llvm/IR/Module.h:680

bool named_metadata_empty() const

Declared at: llvm/include/llvm/IR/Module.h:691

int named_metadata_end() const

Declared at: llvm/include/llvm/IR/Module.h:686

int named_metadata_end()

Declared at: llvm/include/llvm/IR/Module.h:685

size_t named_metadata_size() const

Declared at: llvm/include/llvm/IR/Module.h:690

void print(
    llvm::raw_ostream& OS,
    llvm::AssemblyAnnotationWriter* AAW,
    bool ShouldPreserveUseListOrder = false,
    bool IsForDebug = false) const

Description

Print the module to an output stream with an optional AssemblyAnnotationWriter. If \c ShouldPreserveUseListOrder, then include uselistorder directives so that use-lists can be recreated when reading the assembly.

Declared at: llvm/include/llvm/IR/Module.h:775

Parameters

llvm::raw_ostream& OS
llvm::AssemblyAnnotationWriter* AAW
bool ShouldPreserveUseListOrder = false
bool IsForDebug = false

int rbegin() const

Declared at: llvm/include/llvm/IR/Module.h:604

int rbegin()

Declared at: llvm/include/llvm/IR/Module.h:603

int rend() const

Declared at: llvm/include/llvm/IR/Module.h:606

int rend()

Declared at: llvm/include/llvm/IR/Module.h:605

void setCodeModel(CodeModel::Model CL)

Description

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

Declared at: llvm/include/llvm/IR/Module.h:835

Parameters

CodeModel::Model CL

void setDataLayout(llvm::StringRef Desc)

Description

Set the data layout

Declared at: llvm/include/llvm/IR/Module.h:280

Parameters

llvm::StringRef Desc

void setDataLayout(const llvm::DataLayout& Other)

Declared at: llvm/include/llvm/IR/Module.h:281

Parameters

const llvm::DataLayout& Other

void setMaterializer(llvm::GVMaterializer* GVM)

Description

Sets the GVMaterializer 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 the Module, there is no way to detach or destroy a materializer without materializing all the GVs it controls, to avoid leaving orphan unmaterialized GVs.

Declared at: llvm/include/llvm/IR/Module.h:506

Parameters

llvm::GVMaterializer* GVM

void setModuleIdentifier(llvm::StringRef ID)

Description

Set the module identifier.

Declared at: llvm/include/llvm/IR/Module.h:274

Parameters

llvm::StringRef ID

void setModuleInlineAsm(llvm::StringRef Asm)

Description

Set the module-scope inline assembly blocks. A trailing newline is added if the input doesn't have one.

Declared at: llvm/include/llvm/IR/Module.h:288

Parameters

llvm::StringRef Asm

void setOwnedMemoryBuffer(int MB)

Declared at: llvm/include/llvm/IR/Module.h:868

Parameters

int MB

void setPICLevel(PICLevel::Level PL)

Description

Set the PIC level (small or large model)

Declared at: llvm/include/llvm/IR/Module.h:813

Parameters

PICLevel::Level PL

void setPIELevel(PIELevel::Level PL)

Description

Set the PIE level (small or large model)

Declared at: llvm/include/llvm/IR/Module.h:824

Parameters

PIELevel::Level PL

void setProfileSummary(llvm::Metadata* M,
                       ProfileSummary::Kind Kind)

Description

Attach profile summary metadata to this module.

Declared at: llvm/include/llvm/IR/Module.h:842

Parameters

llvm::Metadata* M
ProfileSummary::Kind Kind

void setRtLibUseGOT()

Description

Set that PLT should be avoid for RTLib calls.

Declared at: llvm/include/llvm/IR/Module.h:853

void setSDKVersion(const llvm::VersionTuple& V)

Description

Attach a build SDK version metadata to this module.

Declared at: llvm/include/llvm/IR/Module.h:859

Parameters

const llvm::VersionTuple& V

void setSourceFileName(llvm::StringRef Name)

Description

Set the module's original source file name.

Declared at: llvm/include/llvm/IR/Module.h:277

Parameters

llvm::StringRef Name

void setTargetTriple(llvm::StringRef T)

Description

Set the target triple.

Declared at: llvm/include/llvm/IR/Module.h:284

Parameters

llvm::StringRef T

bool shouldEmitInstrCountChangedRemark()

Description

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

Declared at: llvm/include/llvm/IR/Module.h:264

size_t size() const

Declared at: llvm/include/llvm/IR/Module.h:607

~Module()

Description

The module destructor. This will dropAllReferences.

Declared at: llvm/include/llvm/IR/Module.h:203