In X86Subtarget.h there is a method `getDataLayout' which selects the data layout depending on the platform, ignoring whatever the user setted with Module::setDataLayout. What's the rationale for this?
On Jul 4, 2010, at 6:43 PM, Óscar Fuentes wrote:> In X86Subtarget.h there is a method `getDataLayout' which selects the > data layout depending on the platform, ignoring whatever the user setted > with Module::setDataLayout. > > What's the rationale for this?Data layout is a property of the target, not the program being compiled. If you don't like structure packing etc, use packed structure types. -Chris
Chris Lattner <clattner at apple.com> writes:> On Jul 4, 2010, at 6:43 PM, Óscar Fuentes wrote: > >> In X86Subtarget.h there is a method `getDataLayout' which selects the >> data layout depending on the platform, ignoring whatever the user setted >> with Module::setDataLayout. >> >> What's the rationale for this? > > Data layout is a property of the target, not the program being > compiled. If you don't like structure packing etc, use packed > structure types.Then, Module::setDataLayout should be removed or make it fail on those circunstances, shouldn't it?