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:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user