[llvm-commits] [PATCH]: wrong PPC32 targetdata in llvm

John McCall rjmccall at apple.com
Thu Jun 30 10:20:55 PDT 2011


On Jun 30, 2011, at 8:47 AM, Roman Divacky wrote:

> On Thu, Jun 30, 2011 at 05:38:42PM +0200, Duncan Sands wrote:
>> Hi Roman,
>> 
>>> The definition of targetdata in llvm differs to the one in clang.
>>> Specifically the ABI alignment of 64bit types on PPC32 is 32 in
>>> llvm and 64 in llvm. The clang one seems to be the correct one.
>> 
>> why isn't clang querying llvm to get the target data?
> 
> I don't know. Clang has target data definition for every arch. It
> seems wrong to me as well.

There was a decision to try to make Clang independent of the linked-in
target machines;  the virtue is that Clang can generate IR for an arbitrary
target without needing an actual backend, which (among other things)
simplifies cross-platform testing.  The disadvantage, of course, is
code / information duplication.

John.



More information about the llvm-commits mailing list