[PATCH] C API: Expose GlobalValue's UnnamedAddr.
Manuel Jacob
me at manueljacob.de
Tue Mar 4 21:37:55 PST 2014
Hi whitequark,
http://llvm-reviews.chandlerc.com/D2959
Files:
include/llvm-c/Core.h
lib/IR/Core.cpp
Index: include/llvm-c/Core.h
===================================================================
--- include/llvm-c/Core.h
+++ include/llvm-c/Core.h
@@ -1697,6 +1697,8 @@
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
Index: lib/IR/Core.cpp
===================================================================
--- lib/IR/Core.cpp
+++ lib/IR/Core.cpp
@@ -1262,6 +1262,14 @@
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) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D2959.1.patch
Type: text/x-patch
Size: 1182 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140304/4ab69f1a/attachment.bin>
More information about the llvm-commits
mailing list