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

Nathan Whitehorn nwhitehorn at freebsd.org
Mon Oct 11 13:09:16 PDT 2010


On 01/-10/63 13:59, Rafael Espindola wrote:
>> this is not FreeBSD specific. what would be the advantage of doing
>> it via class vs simple if() ?
>>      
> It is not a simple if. There are setters for the abi and calls to
> strcmp in the patch :-)
>
> Cheers,
>    

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.
-Nathan


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Targets.cpp.diff
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20101011/09fc8345/attachment.ksh>


More information about the llvm-commits mailing list