about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/debuginfo/gdb.rs
diff options
context:
space:
mode:
authorZalathar <Zalathar@users.noreply.github.com>2024-10-30 10:02:46 +1100
committerZalathar <Zalathar@users.noreply.github.com>2024-10-30 11:38:20 +1100
commit65ff2a6ad71de45c848a622d86b6c74092e1b734 (patch)
tree30dd7c81a575858cb50fbf3b1a2115f92c930c1d /compiler/rustc_codegen_llvm/src/debuginfo/gdb.rs
parent1e4f10ba6476e48a42a79b9f846a2d9366525b9e (diff)
downloadrust-65ff2a6ad71de45c848a622d86b6c74092e1b734.tar.gz
rust-65ff2a6ad71de45c848a622d86b6c74092e1b734.zip
Consistently use safe wrapper function `set_section`
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/debuginfo/gdb.rs')
-rw-r--r--compiler/rustc_codegen_llvm/src/debuginfo/gdb.rs2
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 7947c9c8c8e..aef8642f199 100644
--- a/compiler/rustc_codegen_llvm/src/debuginfo/gdb.rs
+++ b/compiler/rustc_codegen_llvm/src/debuginfo/gdb.rs
@@ -72,7 +72,7 @@ pub(crate) fn get_or_insert_gdb_debug_scripts_section_global<'ll>(
             let section_var = cx
                 .define_global(section_var_name, llvm_type)
                 .unwrap_or_else(|| bug!("symbol `{}` is already defined", section_var_name));
-            llvm::LLVMSetSection(section_var, c".debug_gdb_scripts".as_ptr());
+            llvm::set_section(section_var, c".debug_gdb_scripts");
             llvm::LLVMSetInitializer(section_var, cx.const_bytes(section_contents));
             llvm::LLVMSetGlobalConstant(section_var, llvm::True);
             llvm::LLVMSetUnnamedAddress(section_var, llvm::UnnamedAddr::Global);