Auto merge of #138503 - bjorn3:string_merging, r=tmiasko
Avoid wrapping constant allocations in packed structs when not necessary This way LLVM will set the string merging flag if the alloc is a nul terminated string, reducing binary sizes. try-job: armhf-gnu
This commit is contained in:
commit
de1dd8beee
1 changed files with 1 additions and 0 deletions
|
|
@ -364,6 +364,7 @@ pub fn const_alloc_to_gcc<'gcc>(
|
|||
llvals.push(cx.const_bytes(bytes));
|
||||
}
|
||||
|
||||
// FIXME(bjorn3) avoid wrapping in a struct when there is only a single element.
|
||||
cx.const_struct(&llvals, true)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue