1
Fork 0

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.
This commit is contained in:
Josh Stone 2024-08-20 14:04:48 -07:00
parent a971212545
commit e424e7fcaa
9 changed files with 26 additions and 27 deletions

View file

@ -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);