llvm-c: expose unnamedaddr field of globals

Patch by Manuel Jacob.

llvm-svn: 203482
This commit is contained in:
Tim Northover 2014-03-10 19:24:35 +00:00
parent 1bbc2ed7c0
commit ad96d012c3
2 changed files with 10 additions and 0 deletions

View File

@ -1688,6 +1688,8 @@ LLVMVisibility LLVMGetVisibility(LLVMValueRef Global);
void LLVMSetVisibility(LLVMValueRef Global, LLVMVisibility Viz);
LLVMDLLStorageClass LLVMGetDLLStorageClass(LLVMValueRef Global);
void LLVMSetDLLStorageClass(LLVMValueRef Global, LLVMDLLStorageClass Class);
LLVMBool LLVMHasUnnamedAddr(LLVMValueRef Global);
void LLVMSetUnnamedAddr(LLVMValueRef Global, LLVMBool HasUnnamedAddr);
/**
* @defgroup LLVMCCoreValueWithAlignment Values with alignment

View File

@ -1262,6 +1262,14 @@ void LLVMSetDLLStorageClass(LLVMValueRef Global, LLVMDLLStorageClass Class) {
static_cast<GlobalValue::DLLStorageClassTypes>(Class));
}
LLVMBool LLVMHasUnnamedAddr(LLVMValueRef Global) {
return unwrap<GlobalValue>(Global)->hasUnnamedAddr();
}
void LLVMSetUnnamedAddr(LLVMValueRef Global, LLVMBool HasUnnamedAddr) {
unwrap<GlobalValue>(Global)->setUnnamedAddr(HasUnnamedAddr);
}
/*--.. Operations on global variables, load and store instructions .........--*/
unsigned LLVMGetAlignment(LLVMValueRef V) {