Ensure strings created with const_str
get the unnamed_addr
attribute
This commit is contained in:
parent
1db4b12494
commit
268f5c57b9
1 changed files with 1 additions and 0 deletions
|
@ -203,6 +203,7 @@ impl<'ll, 'tcx> ConstMethods<'tcx> for CodegenCx<'ll, 'tcx> {
|
|||
unsafe {
|
||||
llvm::LLVMSetInitializer(g, sc);
|
||||
llvm::LLVMSetGlobalConstant(g, True);
|
||||
llvm::LLVMSetUnnamedAddress(g, llvm::UnnamedAddr::Global);
|
||||
llvm::LLVMRustSetLinkage(g, llvm::Linkage::InternalLinkage);
|
||||
}
|
||||
(s.to_owned(), g)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue