[llvm-commits] [PATCH]: fixing clang Targets.cpp for PPC

Nathan Whitehorn nwhitehorn at freebsd.org
Thu Oct 14 06:51:28 PDT 2010


On 10/13/10 09:40, Rafael Espindola wrote:
>> I think you're right that the patch should not have all these ifs, so I have
>> reformulated the patch (attached). Since Darwin (and maybe AIX? but clang
>> does not support that, as far as I know) are the oddball case for PPC32, I
>> changed it so PPC32 defaults to the SYSV/ELF ABI, and DarwinPPCTargetInfo
>> just overrides it with its own thing. So now there are no more getters and
>> setters, nor strcmp().
>>
>> Thanks for the review and comments.
>>      
> It is looking a lot better! One thing I noticed is that getBoolWidth
> is not virtual in TargetInfo, so this might not have the effect you
> are looking for. To be consistent with the rest of TargetInfo what you
> probably want is to add member variables to it and have the
> constructor set the correct values.
>    

That is true -- I don't know how I missed that. I also put an error in 
the Darwin64 ABI where bools should be one byte, not four. Here's a new 
version of the patch. Could you tell me if it looks OK?
-Nathan
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: clang-targets.diff
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20101014/5633e5c4/attachment.ksh>


More information about the llvm-commits mailing list