[cfe-commits] [PATCH] Frontend: define _LP64 in a target-independent way

Chandler Carruth chandlerc at google.com
Thu Aug 9 16:31:18 PDT 2012


The logic is great, and i like the refactoring.

However, please don't quote GCC documentation in a patch. ;] I don't think
you even need a comment here, the code says exactly what it is doing. If
you want to do anything you can leave a comment with a link to GCC
documentation for the macro, but I don't know that even that is terribly
important.


On Thu, Aug 9, 2012 at 4:17 PM, nobled <nobled at dreamwidth.org> wrote:

> >From gcc's docs about _LP64 and __LP64__:
> http://gcc.gnu.org/onlinedocs/gcc-4.2.1/cpp/Common-Predefined-Macros.html
> "These macros are defined, with value 1, if (and only if)
> the compilation is for a target where long int and pointer
> both use 64-bits and int uses 32-bit."
>
> Instead of adding it to each individual subclass in
> Targets.cpp, simply check the appropriate target
> values.
>
> Where before it was only on x86_64 and ppc64, it's now
> also defined on mips64 and nvptx64.
>
> This also adds a bunch of negative tests to ensure it is *not*
> defined on any other architectures.
>
> Ok to commit?
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120809/3bc51cd3/attachment.html>


More information about the cfe-commits mailing list