1
Fork 0

Revert "use new c literals instead of cstr! macro"

This reverts commit a17561ffc9.
This commit is contained in:
León Orell Valerian Liehr 2023-07-04 19:53:44 +02:00
parent 9dbe67fc8c
commit 3788b7ab32
No known key found for this signature in database
GPG key ID: D17A07215F68E713
13 changed files with 75 additions and 52 deletions

View file

@ -113,7 +113,7 @@ impl<'ll, 'tcx> CodegenUnitDebugContext<'ll, 'tcx> {
llvm::LLVMRustAddModuleFlag(
self.llmod,
llvm::LLVMModFlagBehavior::Warning,
c"Dwarf Version".as_ptr().cast(),
"Dwarf Version\0".as_ptr().cast(),
dwarf_version,
);
} else {
@ -121,16 +121,17 @@ impl<'ll, 'tcx> CodegenUnitDebugContext<'ll, 'tcx> {
llvm::LLVMRustAddModuleFlag(
self.llmod,
llvm::LLVMModFlagBehavior::Warning,
c"CodeView".as_ptr().cast(),
"CodeView\0".as_ptr().cast(),
1,
)
}
// Prevent bitcode readers from deleting the debug info.
let ptr = "Debug Info Version\0".as_ptr();
llvm::LLVMRustAddModuleFlag(
self.llmod,
llvm::LLVMModFlagBehavior::Warning,
c"Debug Info Version".as_ptr().cast(),
ptr.cast(),
llvm::LLVMRustDebugMetadataVersion(),
);
}