LLVM 20.0.0git
|
This group contains functions that operate on global values. More...
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 char * | LLVMGetSection (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. | |
LLVMValueMetadataEntry * | LLVMGlobalCopyAllMetadata (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. | |
This group contains functions that operate on global values.
Functions in this group relate to functions in the llvm::GlobalValue class tree.
void LLVMDisposeValueMetadataEntries | ( | LLVMValueMetadataEntry * | Entries | ) |
unsigned LLVMGetAlignment | ( | LLVMValueRef | V | ) |
Obtain the preferred alignment of the value.
Definition at line 2113 of file Core.cpp.
References llvm_unreachable, P, and unwrap().
LLVMDLLStorageClass LLVMGetDLLStorageClass | ( | LLVMValueRef | Global | ) |
Definition at line 2062 of file Core.cpp.
References llvm::Global.
LLVMModuleRef LLVMGetGlobalParent | ( | LLVMValueRef | Global | ) |
Definition at line 1940 of file Core.cpp.
References getParent(), llvm::Global, and llvm::wrap().
LLVMLinkage LLVMGetLinkage | ( | LLVMValueRef | Global | ) |
Definition at line 1948 of file Core.cpp.
References llvm::GlobalValue::AppendingLinkage, llvm::GlobalValue::AvailableExternallyLinkage, llvm::GlobalValue::CommonLinkage, llvm::GlobalValue::ExternalLinkage, llvm::GlobalValue::ExternalWeakLinkage, llvm::Global, llvm::GlobalValue::InternalLinkage, llvm::GlobalValue::LinkOnceAnyLinkage, llvm::GlobalValue::LinkOnceODRLinkage, llvm_unreachable, LLVMAppendingLinkage, LLVMAvailableExternallyLinkage, LLVMCommonLinkage, LLVMExternalLinkage, LLVMExternalWeakLinkage, LLVMInternalLinkage, LLVMLinkOnceAnyLinkage, LLVMLinkOnceODRLinkage, LLVMPrivateLinkage, LLVMWeakAnyLinkage, LLVMWeakODRLinkage, llvm::GlobalValue::PrivateLinkage, llvm::GlobalValue::WeakAnyLinkage, and llvm::GlobalValue::WeakODRLinkage.
const char * LLVMGetSection | ( | LLVMValueRef | Global | ) |
Definition at line 2042 of file Core.cpp.
References llvm::Global.
LLVMUnnamedAddr LLVMGetUnnamedAddress | ( | LLVMValueRef | Global | ) |
Definition at line 2072 of file Core.cpp.
References llvm::Global, llvm_unreachable, LLVMGlobalUnnamedAddr, LLVMLocalUnnamedAddr, and LLVMNoUnnamedAddr.
LLVMVisibility LLVMGetVisibility | ( | LLVMValueRef | Global | ) |
Definition at line 2052 of file Core.cpp.
References llvm::Global.
void LLVMGlobalClearMetadata | ( | LLVMValueRef | Global | ) |
Removes all metadata attachments from this value.
Definition at line 2193 of file Core.cpp.
References llvm::Global.
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
.
Definition at line 2153 of file Core.cpp.
References llvm_getMetadata(), and unwrap().
void LLVMGlobalEraseMetadata | ( | LLVMValueRef | Global, |
unsigned | Kind | ||
) |
Erases a metadata attachment of the given kind if it exists.
Definition at line 2189 of file Core.cpp.
References llvm::Global.
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.
Definition at line 2107 of file Core.cpp.
References getValueType(), llvm::Global, and llvm::wrap().
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.
Definition at line 2184 of file Core.cpp.
References llvm::Global.
LLVMBool LLVMHasUnnamedAddr | ( | LLVMValueRef | Global | ) |
Deprecated: Use LLVMGetUnnamedAddress instead.
Definition at line 2097 of file Core.cpp.
References llvm::Global.
LLVMBool LLVMIsDeclaration | ( | LLVMValueRef | Global | ) |
Definition at line 1944 of file Core.cpp.
References llvm::Global.
void LLVMSetAlignment | ( | LLVMValueRef | V, |
unsigned | Bytes | ||
) |
Set the preferred alignment of the value.
Definition at line 2133 of file Core.cpp.
References llvm_unreachable, P, and unwrap().
void LLVMSetDLLStorageClass | ( | LLVMValueRef | Global, |
LLVMDLLStorageClass | Class | ||
) |
Definition at line 2067 of file Core.cpp.
References llvm::Global.
void LLVMSetLinkage | ( | LLVMValueRef | Global, |
LLVMLinkage | Linkage | ||
) |
Definition at line 1977 of file Core.cpp.
References llvm::GlobalValue::AppendingLinkage, llvm::GlobalValue::AvailableExternallyLinkage, llvm::GlobalValue::CommonLinkage, llvm::errs(), llvm::GlobalValue::ExternalLinkage, llvm::GlobalValue::ExternalWeakLinkage, llvm::Global, llvm::GlobalValue::InternalLinkage, llvm::GlobalValue::LinkOnceAnyLinkage, llvm::GlobalValue::LinkOnceODRLinkage, LLVM_DEBUG, LLVMAppendingLinkage, LLVMAvailableExternallyLinkage, LLVMCommonLinkage, LLVMDLLExportLinkage, LLVMDLLImportLinkage, LLVMExternalLinkage, LLVMExternalWeakLinkage, LLVMGhostLinkage, LLVMInternalLinkage, LLVMLinkerPrivateLinkage, LLVMLinkerPrivateWeakLinkage, LLVMLinkOnceAnyLinkage, LLVMLinkOnceODRAutoHideLinkage, LLVMLinkOnceODRLinkage, LLVMPrivateLinkage, LLVMWeakAnyLinkage, LLVMWeakODRLinkage, llvm::GlobalValue::PrivateLinkage, llvm::GlobalValue::setLinkage(), llvm::GlobalValue::WeakAnyLinkage, and llvm::GlobalValue::WeakODRLinkage.
void LLVMSetSection | ( | LLVMValueRef | Global, |
const char * | Section | ||
) |
Definition at line 2048 of file Core.cpp.
References llvm::Global.
void LLVMSetUnnamedAddr | ( | LLVMValueRef | Global, |
LLVMBool | HasUnnamedAddr | ||
) |
Deprecated: Use LLVMSetUnnamedAddress instead.
Definition at line 2101 of file Core.cpp.
References llvm::Global.
void LLVMSetUnnamedAddress | ( | LLVMValueRef | Global, |
LLVMUnnamedAddr | UnnamedAddr | ||
) |
Definition at line 2084 of file Core.cpp.
References llvm::Global, LLVMGlobalUnnamedAddr, LLVMLocalUnnamedAddr, LLVMNoUnnamedAddr, and llvm::GlobalValue::setUnnamedAddr().
void LLVMSetVisibility | ( | LLVMValueRef | Global, |
LLVMVisibility | Viz | ||
) |
Definition at line 2057 of file Core.cpp.
References llvm::Global.
unsigned LLVMValueMetadataEntriesGetKind | ( | LLVMValueMetadataEntry * | Entries, |
unsigned | Index | ||
) |
Returns the kind of a value metadata entry at a specific index.
Definition at line 2165 of file Core.cpp.
References LLVMOpaqueValueMetadataEntry::Kind.
LLVMMetadataRef LLVMValueMetadataEntriesGetMetadata | ( | LLVMValueMetadataEntry * | Entries, |
unsigned | Index | ||
) |
Returns the underlying metadata node of a value metadata entry at a specific index.
Definition at line 2173 of file Core.cpp.
References LLVMOpaqueValueMetadataEntry::Metadata.