diff options
| author | bors <bors@rust-lang.org> | 2024-10-20 16:34:35 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-10-20 16:34:35 +0000 |
| commit | de977a5acf210f7d71ff83f4b8bc42c274ce4ed9 (patch) | |
| tree | 0a0c48eb9dd8db5f171db1c74d9c09e6891d878c /compiler/rustc_codegen_llvm/src/llvm/mod.rs | |
| parent | bfab34af4c5bfbcc9168064857bbec826a60a0b9 (diff) | |
| parent | a860657c0404dfe3297498176b21933836bd3358 (diff) | |
| download | rust-de977a5acf210f7d71ff83f4b8bc42c274ce4ed9.tar.gz rust-de977a5acf210f7d71ff83f4b8bc42c274ce4ed9.zip | |
Auto merge of #131970 - matthiaskrgr:rollup-nr32ksd, r=matthiaskrgr
Rollup of 9 pull requests Successful merges: - #121560 (Allow `#[deny]` inside `#[forbid]` as a no-op) - #131365 (Fix missing rustfmt in msi installer #101993) - #131647 (Register `src/tools/unicode-table-generator` as a runnable tool) - #131843 (compiler: Error on layout of enums with invalid reprs) - #131926 (Align boolean option descriptions in `configure.py`) - #131961 (compiletest: tidy up how `tidy` and `tidy` (html version) are disambiguated) - #131962 (Make `llvm::set_section` take a `&CStr`) - #131964 (add latest crash tests) - #131965 (remove outdated comment) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/llvm/mod.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/llvm/mod.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/compiler/rustc_codegen_llvm/src/llvm/mod.rs b/compiler/rustc_codegen_llvm/src/llvm/mod.rs index b306396e15a..e837022044e 100644 --- a/compiler/rustc_codegen_llvm/src/llvm/mod.rs +++ b/compiler/rustc_codegen_llvm/src/llvm/mod.rs @@ -210,10 +210,9 @@ impl MemoryEffects { } } -pub fn set_section(llglobal: &Value, section_name: &str) { - let section_name_cstr = CString::new(section_name).expect("unexpected CString error"); +pub fn set_section(llglobal: &Value, section_name: &CStr) { unsafe { - LLVMSetSection(llglobal, section_name_cstr.as_ptr()); + LLVMSetSection(llglobal, section_name.as_ptr()); } } |
