about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/allocator.rs
diff options
context:
space:
mode:
authorJosh Stone <jistone@redhat.com>2024-08-20 14:04:48 -0700
committerJosh Stone <jistone@redhat.com>2024-08-20 14:04:48 -0700
commite424e7fcaacf1bd26584a2ecf50299c0058fbba5 (patch)
tree8b91b5746074500b9aab27122bce74464057f260 /compiler/rustc_codegen_llvm/src/allocator.rs
parenta971212545766fdfe0dd68e5d968133f79944a19 (diff)
downloadrust-e424e7fcaacf1bd26584a2ecf50299c0058fbba5.tar.gz
rust-e424e7fcaacf1bd26584a2ecf50299c0058fbba5.zip
Avoid extra `cast()`s after `CStr::as_ptr()`
These used to be `&str` literals that did need a pointer cast, but that
became a no-op after switching to `c""` literals in #118566.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/allocator.rs')
-rw-r--r--compiler/rustc_codegen_llvm/src/allocator.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_llvm/src/allocator.rs b/compiler/rustc_codegen_llvm/src/allocator.rs
index 8fb31082793..b4f3784a31a 100644
--- a/compiler/rustc_codegen_llvm/src/allocator.rs
+++ b/compiler/rustc_codegen_llvm/src/allocator.rs
@@ -149,7 +149,7 @@ fn create_wrapper_function(
         }
         llvm::LLVMRustSetVisibility(callee, llvm::Visibility::Hidden);
 
-        let llbb = llvm::LLVMAppendBasicBlockInContext(llcx, llfn, c"entry".as_ptr().cast());
+        let llbb = llvm::LLVMAppendBasicBlockInContext(llcx, llfn, c"entry".as_ptr());
 
         let llbuilder = llvm::LLVMCreateBuilderInContext(llcx);
         llvm::LLVMPositionBuilderAtEnd(llbuilder, llbb);