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:
parent
a971212545
commit
e424e7fcaa
9 changed files with 26 additions and 27 deletions
|
@ -109,7 +109,7 @@ impl<'ll, 'tcx> CodegenUnitDebugContext<'ll, 'tcx> {
|
|||
llvm::LLVMRustAddModuleFlagU32(
|
||||
self.llmod,
|
||||
llvm::LLVMModFlagBehavior::Warning,
|
||||
c"Dwarf Version".as_ptr().cast(),
|
||||
c"Dwarf Version".as_ptr(),
|
||||
dwarf_version,
|
||||
);
|
||||
} else {
|
||||
|
@ -117,7 +117,7 @@ impl<'ll, 'tcx> CodegenUnitDebugContext<'ll, 'tcx> {
|
|||
llvm::LLVMRustAddModuleFlagU32(
|
||||
self.llmod,
|
||||
llvm::LLVMModFlagBehavior::Warning,
|
||||
c"CodeView".as_ptr().cast(),
|
||||
c"CodeView".as_ptr(),
|
||||
1,
|
||||
)
|
||||
}
|
||||
|
@ -126,7 +126,7 @@ impl<'ll, 'tcx> CodegenUnitDebugContext<'ll, 'tcx> {
|
|||
llvm::LLVMRustAddModuleFlagU32(
|
||||
self.llmod,
|
||||
llvm::LLVMModFlagBehavior::Warning,
|
||||
c"Debug Info Version".as_ptr().cast(),
|
||||
c"Debug Info Version".as_ptr(),
|
||||
llvm::LLVMRustDebugMetadataVersion(),
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue