about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/back/write.rs
diff options
context:
space:
mode:
authorLeón Orell Valerian Liehr <me@fmease.dev>2023-07-04 19:53:44 +0200
committerLeón Orell Valerian Liehr <me@fmease.dev>2023-07-05 13:11:27 +0200
commit3788b7ab32a6398e7563557f7b32f741f43704a3 (patch)
treee8ae9ff5defed3a7ccfe139ab3f21317e951ed9e /compiler/rustc_codegen_llvm/src/back/write.rs
parent9dbe67fc8c722bc8df4a6a792677a93a073773f4 (diff)
downloadrust-3788b7ab32a6398e7563557f7b32f741f43704a3.tar.gz
rust-3788b7ab32a6398e7563557f7b32f741f43704a3.zip
Revert "use new c literals instead of cstr! macro"
This reverts commit a17561ffc90c900cb7d0e96b00c6381244764ef7.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/back/write.rs')
-rw-r--r--compiler/rustc_codegen_llvm/src/back/write.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/compiler/rustc_codegen_llvm/src/back/write.rs b/compiler/rustc_codegen_llvm/src/back/write.rs
index 998e3b300da..0f5e975445f 100644
--- a/compiler/rustc_codegen_llvm/src/back/write.rs
+++ b/compiler/rustc_codegen_llvm/src/back/write.rs
@@ -931,16 +931,16 @@ unsafe fn embed_bitcode(
         let llglobal = llvm::LLVMAddGlobal(
             llmod,
             common::val_ty(llconst),
-            c"rustc.embedded.module".as_ptr().cast(),
+            "rustc.embedded.module\0".as_ptr().cast(),
         );
         llvm::LLVMSetInitializer(llglobal, llconst);
 
         let section = if is_apple {
-            c"__LLVM,__bitcode"
+            "__LLVM,__bitcode\0"
         } else if is_aix {
-            c".ipa"
+            ".ipa\0"
         } else {
-            c".llvmbc"
+            ".llvmbc\0"
         };
         llvm::LLVMSetSection(llglobal, section.as_ptr().cast());
         llvm::LLVMRustSetLinkage(llglobal, llvm::Linkage::PrivateLinkage);
@@ -950,15 +950,15 @@ unsafe fn embed_bitcode(
         let llglobal = llvm::LLVMAddGlobal(
             llmod,
             common::val_ty(llconst),
-            c"rustc.embedded.cmdline".as_ptr().cast(),
+            "rustc.embedded.cmdline\0".as_ptr().cast(),
         );
         llvm::LLVMSetInitializer(llglobal, llconst);
         let section = if is_apple {
-            c"__LLVM,__cmdline"
+            "__LLVM,__cmdline\0"
         } else if is_aix {
-            c".info"
+            ".info\0"
         } else {
-            c".llvmcmd"
+            ".llvmcmd\0"
         };
         llvm::LLVMSetSection(llglobal, section.as_ptr().cast());
         llvm::LLVMRustSetLinkage(llglobal, llvm::Linkage::PrivateLinkage);