summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorReid Kleckner <reid@kleckner.net>2014-03-05 02:34:23 +0000
committerReid Kleckner <reid@kleckner.net>2014-03-05 02:34:23 +0000
commit1372b786798f5be7497644bcfc3d8ecdd685e6d9 (patch)
treed6eb6e7dd4d70532d1492768fabe3ff33e04cc35 /lib
parentd6e0bca951b598bc98f5cf5f89a20214da3703ea (diff)
downloadllvm-1372b786798f5be7497644bcfc3d8ecdd685e6d9.tar.gz
llvm-1372b786798f5be7497644bcfc3d8ecdd685e6d9.tar.bz2
llvm-1372b786798f5be7497644bcfc3d8ecdd685e6d9.tar.xz
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
Diffstat (limited to 'lib')
-rw-r--r--lib/IR/Core.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/IR/Core.cpp b/lib/IR/Core.cpp
index 470fef23eb..c78ddae60b 100644
--- a/lib/IR/Core.cpp
+++ b/lib/IR/Core.cpp
@@ -1252,6 +1252,16 @@ void LLVMSetVisibility(LLVMValueRef Global, LLVMVisibility 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 .........--*/
unsigned LLVMGetAlignment(LLVMValueRef V) {