LLVM 19.0.0git
Modules | Functions

This group contains functions that operate on global values. More...

Collaboration diagram for Global Values:

Modules

 Values with alignment
 Functions in this group only apply to values with alignment, i.e.
 

Functions

LLVMModuleRef LLVMGetGlobalParent (LLVMValueRef Global)
 
LLVMBool LLVMIsDeclaration (LLVMValueRef Global)
 
LLVMLinkage LLVMGetLinkage (LLVMValueRef Global)
 
void LLVMSetLinkage (LLVMValueRef Global, LLVMLinkage Linkage)
 
const charLLVMGetSection (LLVMValueRef Global)
 
void LLVMSetSection (LLVMValueRef Global, const char *Section)
 
LLVMVisibility LLVMGetVisibility (LLVMValueRef Global)
 
void LLVMSetVisibility (LLVMValueRef Global, LLVMVisibility Viz)
 
LLVMDLLStorageClass LLVMGetDLLStorageClass (LLVMValueRef Global)
 
void LLVMSetDLLStorageClass (LLVMValueRef Global, LLVMDLLStorageClass Class)
 
LLVMUnnamedAddr LLVMGetUnnamedAddress (LLVMValueRef Global)
 
void LLVMSetUnnamedAddress (LLVMValueRef Global, LLVMUnnamedAddr UnnamedAddr)
 
LLVMTypeRef LLVMGlobalGetValueType (LLVMValueRef Global)
 Returns the "value type" of a global value.
 
LLVMBool LLVMHasUnnamedAddr (LLVMValueRef Global)
 Deprecated: Use LLVMGetUnnamedAddress instead.
 
void LLVMSetUnnamedAddr (LLVMValueRef Global, LLVMBool HasUnnamedAddr)
 Deprecated: Use LLVMSetUnnamedAddress instead.
 
unsigned LLVMGetAlignment (LLVMValueRef V)
 Obtain the preferred alignment of the value.
 
void LLVMSetAlignment (LLVMValueRef V, unsigned Bytes)
 Set the preferred alignment of the value.
 
void LLVMGlobalSetMetadata (LLVMValueRef Global, unsigned Kind, LLVMMetadataRef MD)
 Sets a metadata attachment, erasing the existing metadata attachment if it already exists for the given kind.
 
void LLVMGlobalEraseMetadata (LLVMValueRef Global, unsigned Kind)
 Erases a metadata attachment of the given kind if it exists.
 
void LLVMGlobalClearMetadata (LLVMValueRef Global)
 Removes all metadata attachments from this value.
 
LLVMValueMetadataEntryLLVMGlobalCopyAllMetadata (LLVMValueRef Value, size_t *NumEntries)
 Retrieves an array of metadata entries representing the metadata attached to this value.
 
void LLVMDisposeValueMetadataEntries (LLVMValueMetadataEntry *Entries)
 Destroys value metadata entries.
 
unsigned LLVMValueMetadataEntriesGetKind (LLVMValueMetadataEntry *Entries, unsigned Index)
 Returns the kind of a value metadata entry at a specific index.
 
LLVMMetadataRef LLVMValueMetadataEntriesGetMetadata (LLVMValueMetadataEntry *Entries, unsigned Index)
 Returns the underlying metadata node of a value metadata entry at a specific index.
 

Detailed Description

This group contains functions that operate on global values.

Functions in this group relate to functions in the llvm::GlobalValue class tree.

See also
llvm::GlobalValue

Function Documentation

◆ LLVMDisposeValueMetadataEntries()

void LLVMDisposeValueMetadataEntries ( LLVMValueMetadataEntry Entries)

Destroys value metadata entries.

Definition at line 2075 of file Core.cpp.

◆ LLVMGetAlignment()

unsigned LLVMGetAlignment ( LLVMValueRef  V)

Obtain the preferred alignment of the value.

See also
llvm::AllocaInst::getAlignment()
llvm::LoadInst::getAlignment()
llvm::StoreInst::getAlignment()
llvm::AtomicRMWInst::setAlignment()
llvm::AtomicCmpXchgInst::setAlignment()
llvm::GlobalValue::getAlignment()

Definition at line 2008 of file Core.cpp.

References llvm_unreachable, P, and llvm::unwrap().

◆ LLVMGetDLLStorageClass()

LLVMDLLStorageClass LLVMGetDLLStorageClass ( LLVMValueRef  Global)

Definition at line 1957 of file Core.cpp.

References llvm::Global.

◆ LLVMGetGlobalParent()

LLVMModuleRef LLVMGetGlobalParent ( LLVMValueRef  Global)

Definition at line 1835 of file Core.cpp.

References getParent(), llvm::Global, and llvm::wrap().

◆ LLVMGetLinkage()

LLVMLinkage LLVMGetLinkage ( LLVMValueRef  Global)

◆ LLVMGetSection()

const char * LLVMGetSection ( LLVMValueRef  Global)

Definition at line 1937 of file Core.cpp.

References llvm::Global.

◆ LLVMGetUnnamedAddress()

LLVMUnnamedAddr LLVMGetUnnamedAddress ( LLVMValueRef  Global)

◆ LLVMGetVisibility()

LLVMVisibility LLVMGetVisibility ( LLVMValueRef  Global)

Definition at line 1947 of file Core.cpp.

References llvm::Global.

◆ LLVMGlobalClearMetadata()

void LLVMGlobalClearMetadata ( LLVMValueRef  Global)

Removes all metadata attachments from this value.

See also
llvm::GlobalObject::clearMetadata()

Definition at line 2088 of file Core.cpp.

References llvm::Global.

◆ LLVMGlobalCopyAllMetadata()

LLVMValueMetadataEntry * LLVMGlobalCopyAllMetadata ( LLVMValueRef  Value,
size_t *  NumEntries 
)

Retrieves an array of metadata entries representing the metadata attached to this value.

The caller is responsible for freeing this array by calling LLVMDisposeValueMetadataEntries.

See also
llvm::GlobalObject::getAllMetadata()

Definition at line 2048 of file Core.cpp.

References llvm_getMetadata(), and llvm::unwrap().

◆ LLVMGlobalEraseMetadata()

void LLVMGlobalEraseMetadata ( LLVMValueRef  Global,
unsigned  Kind 
)

Erases a metadata attachment of the given kind if it exists.

See also
llvm::GlobalObject::eraseMetadata()

Definition at line 2084 of file Core.cpp.

References llvm::Global.

◆ LLVMGlobalGetValueType()

LLVMTypeRef LLVMGlobalGetValueType ( LLVMValueRef  Global)

Returns the "value type" of a global value.

This differs from the formal type of a global value which is always a pointer type.

See also
llvm::GlobalValue::getValueType()

Definition at line 2002 of file Core.cpp.

References llvm::Global, and llvm::wrap().

◆ LLVMGlobalSetMetadata()

void LLVMGlobalSetMetadata ( LLVMValueRef  Global,
unsigned  Kind,
LLVMMetadataRef  MD 
)

Sets a metadata attachment, erasing the existing metadata attachment if it already exists for the given kind.

See also
llvm::GlobalObject::setMetadata()

Definition at line 2079 of file Core.cpp.

References llvm::Global.

◆ LLVMHasUnnamedAddr()

LLVMBool LLVMHasUnnamedAddr ( LLVMValueRef  Global)

Deprecated: Use LLVMGetUnnamedAddress instead.

Definition at line 1992 of file Core.cpp.

References llvm::Global.

◆ LLVMIsDeclaration()

LLVMBool LLVMIsDeclaration ( LLVMValueRef  Global)

Definition at line 1839 of file Core.cpp.

References llvm::Global.

◆ LLVMSetAlignment()

void LLVMSetAlignment ( LLVMValueRef  V,
unsigned  Bytes 
)

Set the preferred alignment of the value.

See also
llvm::AllocaInst::setAlignment()
llvm::LoadInst::setAlignment()
llvm::StoreInst::setAlignment()
llvm::AtomicRMWInst::setAlignment()
llvm::AtomicCmpXchgInst::setAlignment()
llvm::GlobalValue::setAlignment()

Definition at line 2028 of file Core.cpp.

References llvm_unreachable, P, and llvm::unwrap().

◆ LLVMSetDLLStorageClass()

void LLVMSetDLLStorageClass ( LLVMValueRef  Global,
LLVMDLLStorageClass  Class 
)

Definition at line 1962 of file Core.cpp.

References llvm::Global.

◆ LLVMSetLinkage()

void LLVMSetLinkage ( LLVMValueRef  Global,
LLVMLinkage  Linkage 
)

◆ LLVMSetSection()

void LLVMSetSection ( LLVMValueRef  Global,
const char Section 
)

Definition at line 1943 of file Core.cpp.

References llvm::Global.

◆ LLVMSetUnnamedAddr()

void LLVMSetUnnamedAddr ( LLVMValueRef  Global,
LLVMBool  HasUnnamedAddr 
)

Deprecated: Use LLVMSetUnnamedAddress instead.

Definition at line 1996 of file Core.cpp.

References llvm::Global.

◆ LLVMSetUnnamedAddress()

void LLVMSetUnnamedAddress ( LLVMValueRef  Global,
LLVMUnnamedAddr  UnnamedAddr 
)

◆ LLVMSetVisibility()

void LLVMSetVisibility ( LLVMValueRef  Global,
LLVMVisibility  Viz 
)

Definition at line 1952 of file Core.cpp.

References llvm::Global.

◆ LLVMValueMetadataEntriesGetKind()

unsigned LLVMValueMetadataEntriesGetKind ( LLVMValueMetadataEntry Entries,
unsigned  Index 
)

Returns the kind of a value metadata entry at a specific index.

Definition at line 2060 of file Core.cpp.

References LLVMOpaqueValueMetadataEntry::Kind.

◆ LLVMValueMetadataEntriesGetMetadata()

LLVMMetadataRef LLVMValueMetadataEntriesGetMetadata ( LLVMValueMetadataEntry Entries,
unsigned  Index 
)

Returns the underlying metadata node of a value metadata entry at a specific index.

Definition at line 2068 of file Core.cpp.

References LLVMOpaqueValueMetadataEntry::Metadata.