jhuber6 wrote: > > Hm, that's what I'm doing in the `printf` implementation and it doesn't > > work without that patch. When I look at the varargs struct it didn't have > > any padding, which explained why `alignTo(ptr + size, align)` was wrong. > > So, I was trying to do the following, `printf("%d%ld", 1, 1l)`. With this > > patch I get the following, > > For what IR? Is the small struct getting expanded into individual scalar > pieces?
The implementation intentionally states that the alignment is always `4` in this case, which results in there being no padding between the four byte and eight byte values when put into a `void *` buffer for varargs. You should be able to see it in the changes to the tests. Unfortunately, @JonChesterfield is on vacation so I can't ask about this as it seems to be a deliberate choice, but I don't know how it's correct. https://github.com/llvm/llvm-project/pull/96370 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits