[llvm-dev] How to change CLang struct alignment behaviour?
Tim Northover via llvm-dev
llvm-dev at lists.llvm.org
Sun May 12 23:36:07 PDT 2019
On Sun, 12 May 2019 at 21:02, Joan Lluch via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> How do I change that behaviour to get structs always (at least) 2 byte aligned ?
I don't think there's a feature you can toggle for this (except,
maybe, making the alignment of every basic type 2 bytes; but that
would obviously affect arrays and even normal variables too). So you
probably have to modify lib/AST/RecordLayoutBuilder.cpp directly.
Might be worth asking this on the cfe-dev mailing list though. That's
where most of the Clang experts live.
More information about the llvm-dev