diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2025-02-12 06:07:35 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-12 06:07:35 +0100 |
| commit | 9e89feefb9ce0309cc7fdba91b4e42c4bfe7bbb8 (patch) | |
| tree | 5a95a808bb78c41fc231c0676b751bf4013f49e0 /compiler/rustc_codegen_llvm/src/debuginfo | |
| parent | 34a5ea911c56e79bd451c63f04ea2f5023d7d1a3 (diff) | |
| parent | dcf1e4d72b4dbda592050dcde7d7972414b05d3c (diff) | |
| download | rust-9e89feefb9ce0309cc7fdba91b4e42c4bfe7bbb8.tar.gz rust-9e89feefb9ce0309cc7fdba91b4e42c4bfe7bbb8.zip | |
Rollup merge of #135549 - oli-obk:push-tmxtpnrloyqu, r=compiler-errors
Document some safety constraints and use more safe wrappers Lots of unsafe codegen_llvm code has safe wrappers already, so I used some of them and added some where applicable. I stopped here because this diff is large enough and should probably be reviewed independently of other changes.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/debuginfo')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/debuginfo/gdb.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_llvm/src/debuginfo/gdb.rs b/compiler/rustc_codegen_llvm/src/debuginfo/gdb.rs index 2c9f1cda13a..54c5d445f66 100644 --- a/compiler/rustc_codegen_llvm/src/debuginfo/gdb.rs +++ b/compiler/rustc_codegen_llvm/src/debuginfo/gdb.rs @@ -73,7 +73,7 @@ pub(crate) fn get_or_insert_gdb_debug_scripts_section_global<'ll>( .define_global(section_var_name, llvm_type) .unwrap_or_else(|| bug!("symbol `{}` is already defined", section_var_name)); llvm::set_section(section_var, c".debug_gdb_scripts"); - llvm::LLVMSetInitializer(section_var, cx.const_bytes(section_contents)); + llvm::set_initializer(section_var, cx.const_bytes(section_contents)); llvm::LLVMSetGlobalConstant(section_var, llvm::True); llvm::LLVMSetUnnamedAddress(section_var, llvm::UnnamedAddr::Global); llvm::set_linkage(section_var, llvm::Linkage::LinkOnceODRLinkage); |
