about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorKai Luo <lkail@cn.ibm.com>2023-06-08 13:24:35 +0800
committerKai Luo <lkail@cn.ibm.com>2023-06-08 13:24:35 +0800
commit7b79cb1759fce014f23267ce7884ba8d6ab402e7 (patch)
tree99b88ac8bdf9ac6036c9525d61c8166eff09f527 /compiler/rustc_codegen_llvm/src
parent5725561e169fa38f5f151a90f8924ee4cb3c6052 (diff)
downloadrust-7b79cb1759fce014f23267ce7884ba8d6ab402e7.tar.gz
rust-7b79cb1759fce014f23267ce7884ba8d6ab402e7.zip
Use `c`-prefixed string
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
-rw-r--r--compiler/rustc_codegen_llvm/src/back/write.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/compiler/rustc_codegen_llvm/src/back/write.rs b/compiler/rustc_codegen_llvm/src/back/write.rs
index 6cfb7629382..b6de5ee40c7 100644
--- a/compiler/rustc_codegen_llvm/src/back/write.rs
+++ b/compiler/rustc_codegen_llvm/src/back/write.rs
@@ -901,11 +901,11 @@ unsafe fn embed_bitcode(
         llvm::LLVMSetInitializer(llglobal, llconst);
 
         let section = if is_apple {
-            "__LLVM,__bitcode"
+            c"__LLVM,__bitcode"
         } else if is_aix {
-            ".ipa"
+            c".ipa"
         } else {
-            ".llvmbc"
+            c".llvmbc"
         };
         llvm::LLVMSetSection(llglobal, section.as_ptr().cast());
         llvm::LLVMRustSetLinkage(llglobal, llvm::Linkage::PrivateLinkage);
@@ -919,11 +919,11 @@ unsafe fn embed_bitcode(
         );
         llvm::LLVMSetInitializer(llglobal, llconst);
         let section = if is_apple {
-            "__LLVM,__cmdline"
+            c"__LLVM,__cmdline"
         } else if is_aix {
-            ".info"
+            c".info"
         } else {
-            ".llvmcmd"
+            c".llvmcmd"
         };
         llvm::LLVMSetSection(llglobal, section.as_ptr().cast());
         llvm::LLVMRustSetLinkage(llglobal, llvm::Linkage::PrivateLinkage);