LLVM 22.0.0git
llvm::sandboxir::Module Class Reference

In SandboxIR the Module is mainly used to access the list of global objects. More...

#include "llvm/SandboxIR/Module.h"

Public Member Functions

ContextgetContext () const
LLVM_ABI FunctiongetFunction (StringRef Name) const
const DataLayoutgetDataLayout () const
const std::string & getSourceFileName () const
LLVM_ABI GlobalVariablegetGlobalVariable (StringRef Name, bool AllowInternal) const
 Look up the specified global variable in the module symbol table.
GlobalVariablegetGlobalVariable (StringRef Name) const
GlobalVariablegetNamedGlobal (StringRef Name) const
 Return the global variable in the module with the specified name, of arbitrary type.
LLVM_ABI GlobalAliasgetNamedAlias (StringRef Name) const
 Return the global alias in the module with the specified name, of arbitrary type.
LLVM_ABI GlobalIFuncgetNamedIFunc (StringRef Name) const
 Return the global ifunc in the module with the specified name, of arbitrary type.
void dumpOS (raw_ostream &OS) const
LLVM_DUMP_METHOD void dump () const

Friends

class Context

Detailed Description

In SandboxIR the Module is mainly used to access the list of global objects.

Definition at line 32 of file Module.h.

Member Function Documentation

◆ dump()

LLVM_DUMP_METHOD void llvm::sandboxir::Module::dump ( ) const

References LLVM_DUMP_METHOD.

◆ dumpOS()

void Module::dumpOS ( raw_ostream & OS) const

Definition at line 37 of file Module.cpp.

References dumpOS().

Referenced by dumpOS().

◆ getContext()

Context & llvm::sandboxir::Module::getContext ( ) const
inline

Definition at line 40 of file Module.h.

References Context.

◆ getDataLayout()

const DataLayout & llvm::sandboxir::Module::getDataLayout ( ) const
inline

Definition at line 44 of file Module.h.

◆ getFunction()

LLVM_ABI Function * llvm::sandboxir::Module::getFunction ( StringRef Name) const

References LLVM_ABI.

◆ getGlobalVariable() [1/2]

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

Definition at line 56 of file Module.h.

References getGlobalVariable().

◆ getGlobalVariable() [2/2]

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

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.

References LLVM_ABI.

Referenced by getGlobalVariable(), and getNamedGlobal().

◆ getNamedAlias()

LLVM_ABI GlobalAlias * llvm::sandboxir::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.

References LLVM_ABI.

◆ getNamedGlobal()

GlobalVariable * llvm::sandboxir::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 line 62 of file Module.h.

References getGlobalVariable().

◆ getNamedIFunc()

LLVM_ABI GlobalIFunc * llvm::sandboxir::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.

References LLVM_ABI.

◆ getSourceFileName()

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

Definition at line 46 of file Module.h.

◆ Context

friend class Context
friend

Definition at line 37 of file Module.h.

References Context.

Referenced by Context, and getContext().


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