diff --git a/include/llvm-c/Core.h b/include/llvm-c/Core.h index bd150eaaae9..50c5e3ac46f 100644 --- a/include/llvm-c/Core.h +++ b/include/llvm-c/Core.h @@ -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 diff --git a/lib/IR/Core.cpp b/lib/IR/Core.cpp index 0c2e31a0b02..4f3d8b19755 100644 --- a/lib/IR/Core.cpp +++ b/lib/IR/Core.cpp @@ -1262,6 +1262,14 @@ void LLVMSetDLLStorageClass(LLVMValueRef Global, LLVMDLLStorageClass Class) { static_cast(Class)); } +LLVMBool LLVMHasUnnamedAddr(LLVMValueRef Global) { + return unwrap(Global)->hasUnnamedAddr(); +} + +void LLVMSetUnnamedAddr(LLVMValueRef Global, LLVMBool HasUnnamedAddr) { + unwrap(Global)->setUnnamedAddr(HasUnnamedAddr); +} + /*--.. Operations on global variables, load and store instructions .........--*/ unsigned LLVMGetAlignment(LLVMValueRef V) {