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

@ -8,6 +8,7 @@ use crate::llvm::{self, True};
use crate::type_::Type;
use crate::type_of::LayoutLlvmExt;
use crate::value::Value;
use cstr::cstr;
use rustc_codegen_ssa::traits::*;
use rustc_hir::def_id::DefId;
use rustc_middle::middle::codegen_fn_attrs::{CodegenFnAttrFlags, CodegenFnAttrs};
@ -481,9 +482,9 @@ impl<'ll> StaticMethods for CodegenCx<'ll, '_> {
.all(|&byte| byte == 0);
let sect_name = if all_bytes_are_zero {
c"__DATA,__thread_bss"
cstr!("__DATA,__thread_bss")
} else {
c"__DATA,__thread_data"
cstr!("__DATA,__thread_data")
};
llvm::LLVMSetSection(g, sect_name.as_ptr());
}
@ -512,7 +513,7 @@ impl<'ll> StaticMethods for CodegenCx<'ll, '_> {
let val = llvm::LLVMMetadataAsValue(self.llcx, meta);
llvm::LLVMAddNamedMetadataOperand(
self.llmod,
c"wasm.custom_sections".as_ptr().cast(),
"wasm.custom_sections\0".as_ptr().cast(),
val,
);
}