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

nobled nobled at dreamwidth.org
Thu Aug 9 16:17:05 PDT 2012


>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?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-Frontend-define-_LP64-in-a-target-independent-way.patch
Type: application/octet-stream
Size: 11964 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120809/7dfd12c5/attachment.obj>


More information about the cfe-commits mailing list