diff options
| author | bors <bors@rust-lang.org> | 2025-03-28 10:18:32 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-03-28 10:18:32 +0000 |
| commit | de1dd8beee76736ca95aa2ed648661e0d38f0857 (patch) | |
| tree | cb01b493cdad4ed0d0a193d2a16436ea498c91c1 | |
| parent | b25a593b40e88019a5c76198f5c69e2fcced368d (diff) | |
| parent | 2f5aa084c8bb6e1a4b014396a44087fd65a4c1c8 (diff) | |
| download | rust-de1dd8beee76736ca95aa2ed648661e0d38f0857.tar.gz rust-de1dd8beee76736ca95aa2ed648661e0d38f0857.zip | |
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
| -rw-r--r-- | src/consts.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/consts.rs b/src/consts.rs index c514b7a428b..474475f311f 100644 --- a/src/consts.rs +++ b/src/consts.rs @@ -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) } |
