diff options
| author | Oli Scherer <github333195615777966@oli-obk.de> | 2025-01-14 12:25:16 +0000 |
|---|---|---|
| committer | Oli Scherer <github333195615777966@oli-obk.de> | 2025-02-11 09:47:13 +0000 |
| commit | dcf1e4d72b4dbda592050dcde7d7972414b05d3c (patch) | |
| tree | b56ce5ad454c1692896c3f38db52327ac674b0fc /compiler/rustc_codegen_llvm/src/declare.rs | |
| parent | 4b83038d637c1664df94895c82cb8b26716bad1d (diff) | |
| download | rust-dcf1e4d72b4dbda592050dcde7d7972414b05d3c.tar.gz rust-dcf1e4d72b4dbda592050dcde7d7972414b05d3c.zip | |
Document some safety constraints and use more safe wrappers
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/declare.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/declare.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_llvm/src/declare.rs b/compiler/rustc_codegen_llvm/src/declare.rs index bdc83267cca..cebceef1b93 100644 --- a/compiler/rustc_codegen_llvm/src/declare.rs +++ b/compiler/rustc_codegen_llvm/src/declare.rs @@ -235,7 +235,7 @@ impl<'ll, 'tcx> CodegenCx<'ll, 'tcx> { /// name. pub(crate) fn get_defined_value(&self, name: &str) -> Option<&'ll Value> { self.get_declared_value(name).and_then(|val| { - let declaration = unsafe { llvm::LLVMIsDeclaration(val) != 0 }; + let declaration = llvm::is_declaration(val); if !declaration { Some(val) } else { None } }) } |
