mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-28 06:32:09 +00:00
C API: Add functions to get or set a GlobalValue's DLLStorageClass
Patch by Manuel Jacob! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202928 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d6e0bca951
commit
1372b78679
@ -299,6 +299,12 @@ typedef enum {
|
|||||||
LLVMProtectedVisibility /**< The GV is protected */
|
LLVMProtectedVisibility /**< The GV is protected */
|
||||||
} LLVMVisibility;
|
} LLVMVisibility;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
LLVMDefaultStorageClass = 0,
|
||||||
|
LLVMDLLImportStorageClass = 1, /**< Function to be imported from DLL. */
|
||||||
|
LLVMDLLExportStorageClass = 2 /**< Function to be accessible from DLL. */
|
||||||
|
} LLVMDLLStorageClass;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
LLVMCCallConv = 0,
|
LLVMCCallConv = 0,
|
||||||
LLVMFastCallConv = 8,
|
LLVMFastCallConv = 8,
|
||||||
@ -1689,6 +1695,8 @@ const char *LLVMGetSection(LLVMValueRef Global);
|
|||||||
void LLVMSetSection(LLVMValueRef Global, const char *Section);
|
void LLVMSetSection(LLVMValueRef Global, const char *Section);
|
||||||
LLVMVisibility LLVMGetVisibility(LLVMValueRef Global);
|
LLVMVisibility LLVMGetVisibility(LLVMValueRef Global);
|
||||||
void LLVMSetVisibility(LLVMValueRef Global, LLVMVisibility Viz);
|
void LLVMSetVisibility(LLVMValueRef Global, LLVMVisibility Viz);
|
||||||
|
LLVMDLLStorageClass LLVMGetDLLStorageClass(LLVMValueRef Global);
|
||||||
|
void LLVMSetDLLStorageClass(LLVMValueRef Global, LLVMDLLStorageClass Class);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @defgroup LLVMCCoreValueWithAlignment Values with alignment
|
* @defgroup LLVMCCoreValueWithAlignment Values with alignment
|
||||||
|
@ -1252,6 +1252,16 @@ void LLVMSetVisibility(LLVMValueRef Global, LLVMVisibility Viz) {
|
|||||||
->setVisibility(static_cast<GlobalValue::VisibilityTypes>(Viz));
|
->setVisibility(static_cast<GlobalValue::VisibilityTypes>(Viz));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LLVMDLLStorageClass LLVMGetDLLStorageClass(LLVMValueRef Global) {
|
||||||
|
return static_cast<LLVMDLLStorageClass>(
|
||||||
|
unwrap<GlobalValue>(Global)->getDLLStorageClass());
|
||||||
|
}
|
||||||
|
|
||||||
|
void LLVMSetDLLStorageClass(LLVMValueRef Global, LLVMDLLStorageClass Class) {
|
||||||
|
unwrap<GlobalValue>(Global)->setDLLStorageClass(
|
||||||
|
static_cast<GlobalValue::DLLStorageClassTypes>(Class));
|
||||||
|
}
|
||||||
|
|
||||||
/*--.. Operations on global variables, load and store instructions .........--*/
|
/*--.. Operations on global variables, load and store instructions .........--*/
|
||||||
|
|
||||||
unsigned LLVMGetAlignment(LLVMValueRef V) {
|
unsigned LLVMGetAlignment(LLVMValueRef V) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user