1
Fork 0

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.
This commit is contained in:
bjorn3 2025-03-14 15:56:33 +00:00
parent f7b4354283
commit a5fa12b6b9
8 changed files with 26 additions and 25 deletions

View file

@ -3,7 +3,7 @@
#![crate_type = "lib"]
// CHECK: @VAR1 = {{(dso_local )?}}constant <{ [4 x i8] }> <{ [4 x i8] c"\01\00\00\00" }>, section ".test_one"
// CHECK: @VAR1 = {{(dso_local )?}}constant [4 x i8] c"\01\00\00\00", section ".test_one"
#[no_mangle]
#[link_section = ".test_one"]
#[cfg(target_endian = "little")]