about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/llvm
diff options
context:
space:
mode:
authorOli Scherer <github333195615777966@oli-obk.de>2025-02-14 17:27:49 +0000
committerOli Scherer <github333195615777966@oli-obk.de>2025-02-20 11:15:00 +0000
commitea7180813b4dface2bc02a9095ce1ebb8c64d4de (patch)
tree879b32c2710a8c9bbb4c2902503d6a2c4ecbd46e /compiler/rustc_codegen_llvm/src/llvm
parenteeb9035117dc85fa4abe8e2abb09285fd65b0263 (diff)
downloadrust-ea7180813b4dface2bc02a9095ce1ebb8c64d4de.tar.gz
rust-ea7180813b4dface2bc02a9095ce1ebb8c64d4de.zip
Create safe helper for LLVMSetDLLStorageClass
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/llvm')
-rw-r--r--compiler/rustc_codegen_llvm/src/llvm/mod.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_llvm/src/llvm/mod.rs b/compiler/rustc_codegen_llvm/src/llvm/mod.rs
index efc9cf2ef69..7f57e640637 100644
--- a/compiler/rustc_codegen_llvm/src/llvm/mod.rs
+++ b/compiler/rustc_codegen_llvm/src/llvm/mod.rs
@@ -403,3 +403,9 @@ pub(crate) fn add_module_flag_str(
         );
     }
 }
+
+pub(crate) fn set_dllimport_storage_class<'ll>(v: &'ll Value) {
+    unsafe {
+        LLVMSetDLLStorageClass(v, DLLStorageClass::DllImport);
+    }
+}