[LLVMdev] Data layout hard coded for X86 target
ofv at wanadoo.es
Tue Jul 6 19:52:27 PDT 2010
Chris Lattner <clattner at apple.com> writes:
>> OTOH, I know that if language implementation exchanges data with C/C++,
>> it must follow certain platform-dependant data layout, but if the
>> language does not share structs with C/C++ then it is free to align the
>> data members as it pleases, as long as it does not violate the
>> constraints imposed by the hardware. It is surprising to see that LLVM
>> imposes the C/C++ platform's data layout on its users.
> It doesn't, just leave it empty.
I see no way of using a data layout that differs from what
X86SubTarget::getDataLayout provides. Unless I apply a local patch for
that method function, of course.
The point here is that I want to set the data layout my language spec
requires, but LLVM does not allow that because
X86SubTarget::getDataLayout returns whatever GCC uses on each platform.
More information about the llvm-dev