[cfe-commits] [PATCH] Pre-define _MIPS_ARCH for MIPS target.

Simon Atanasyan satanasyan at mips.com
Wed Aug 29 06:58:36 PDT 2012


Hi,

On Wed, Aug 29, 2012 at 2:35 PM, Logan Chien <tzuhsiang.chien at gmail.com> wrote:
>   It seems that clang is not pre-defining _MIPS_ARCH as gcc did.
> This may cause some problem when we are using clang as the
> cross compiler.  The attached patch contains a simple fix and the
> test cases.  Please have a look.  Thanks.

LGTM

Just a couple of notes:
1. I suggest to replace wildcards by real processor names in the test.
If/when we change default processor names, we will change the test
accordingly.
2. CPU variable is std::string so it is not necessary to use explicit
cast in the following expression:
std::string("\"") + CPU + "\""

Any objections?

--
Simon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mips-arch.patch
Type: application/octet-stream
Size: 2075 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120829/5b38882a/attachment.obj>


More information about the cfe-commits mailing list