[cfe-dev] How do I specify a specific PowerPC CPU to clang?
Andy Gibbs
andyg1001 at hotmail.co.uk
Mon Jul 2 07:04:09 PDT 2012
On Monday, July 02, 2012 3:43 PM, Hal Finkel wrote:
> On Mon, 2 Jul 2012 15:09:31 +0200
> Andy Gibbs <andyg1001 at hotmail.co.uk> wrote:
>
>> On Tuesday, June 19, 2012 2:09 AM, Hal Finkel wrote:
>> > Sean, Richard,
>> >
>> > I added -mcpu support for PPC to trunk clang in r158334. Does this
>> > not work for you?
>> >
>> > -Hal
>>
>> Hal,
>>
>> Thanks for adding this feature.
>>
>
> Andy,
>
>> Please can I offer an improvement to it?
>
> Of course :)
>
>> In your commit comments you
>> stated "a few preprocessor defines for common CPU types have been
>> added". Attached is a patch that adds more.
>
> A few quick things:
>
>> + /// \brief Flags for architecture specific defines.
>> + typedef enum {
>> + ppc_arch_none = 0,
>> + ppc_arch_name = 1 << 0, // <name> is substituted for arch name.
>> + ppc_arch_ppcgr = 1 << 1,
>
> You need to follow the coding conventions for naming the constants here:
> http://llvm.org/docs/CodingStandards.html#name-types-functions-variables-and-enumerators-properly
Ooops, sorry, I've spent the morning working to another set of coding standards and its unfortunately carried across!
Attached is a fixed patch.
Cheers
Andy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ppc-defines.patch
Type: application/octet-stream
Size: 8745 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20120702/89ac5e34/attachment.obj>
More information about the cfe-dev
mailing list