[LLVMdev] Data layout hard coded for X86 target

Óscar Fuentes ofv at wanadoo.es
Mon Jul 5 03:31:58 PDT 2010

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? 

More information about the llvm-dev mailing list