[llvm] r187248 - [PowerPC] Improve consistency in use of __ppc__, __powerpc__, etc.

Chandler Carruth chandlerc at google.com
Fri Jul 26 15:12:07 PDT 2013


On Fri, Jul 26, 2013 at 2:39 PM, Bill Schmidt
<wschmidt at linux.vnet.ibm.com>wrote:

> Both GCC and LLVM will implicitly define __ppc__ and __powerpc__ for
> all PowerPC targets, whether 32- or 64-bit.  They will both implicitly
> define __ppc64__ and __powerpc64__ for 64-bit PowerPC targets, and not
> for 32-bit targets.
>

I don't think this is true for all versions of GCC we use, and certainly
isn't true for all versions of Clang (see my commit some time ago fixing a
Clang bug here).


>  We cannot be sure that all other possible
> compilers used to compile Clang/LLVM define both __ppc__ and
> __powerpc__, for example, so it is best to check for both when relying
> on either inside the Clang/LLVM code base.
>

Actually, we can be sure that they don't. ;] GCC, Clang, and xlC are
(afaik) the only ppc targeting toolchains we need to support. That said, we
need to support many versions of them.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130726/7b099eb7/attachment.html>


More information about the llvm-commits mailing list