diff options
| author | Zalathar <Zalathar@users.noreply.github.com> | 2024-10-25 21:40:38 +1100 |
|---|---|---|
| committer | Zalathar <Zalathar@users.noreply.github.com> | 2024-10-26 20:20:18 +1100 |
| commit | 983d258be3cbfc72a806c870a69743b6d14e4a33 (patch) | |
| tree | 134bf78f9685f4830a25b764d47d2c3e3066fe9a /compiler/rustc_codegen_llvm/src/callee.rs | |
| parent | 144a12acdd673f333b420e946965621be76d3544 (diff) | |
| download | rust-983d258be3cbfc72a806c870a69743b6d14e4a33.tar.gz rust-983d258be3cbfc72a806c870a69743b6d14e4a33.zip | |
Use safe wrappers `get_linkage` and `set_linkage`
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/callee.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/callee.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_llvm/src/callee.rs b/compiler/rustc_codegen_llvm/src/callee.rs index a51ef8d7b85..0e85c7c7d00 100644 --- a/compiler/rustc_codegen_llvm/src/callee.rs +++ b/compiler/rustc_codegen_llvm/src/callee.rs @@ -95,9 +95,9 @@ pub(crate) fn get_fn<'ll, 'tcx>(cx: &CodegenCx<'ll, 'tcx>, instance: Instance<'t // whether we are sharing generics or not. The important thing here is // that the visibility we apply to the declaration is the same one that // has been applied to the definition (wherever that definition may be). - unsafe { - llvm::LLVMRustSetLinkage(llfn, llvm::Linkage::ExternalLinkage); + llvm::set_linkage(llfn, llvm::Linkage::ExternalLinkage); + unsafe { let is_generic = instance.args.non_erasable_generics().next().is_some(); let is_hidden = if is_generic { |
