[cfe-commits] [patch] Add a llvm::Triple::CPUArch enum

Daniel Dunbar daniel at zuster.org
Wed Oct 31 10:55:27 PDT 2012


I think very little of the char* handling in the driver is related to this
particular issue.

I'm hesitant to promote the very specialized Darwin CPU arch naming scheme
higher in the API. This isn't really a useful scheme (i.e., no one else
should use this notion), but is required for Darwin compatibility.

If anything, I'd rather go the other direction and
localize getArchTypeForDarwinArchName into Clang.

 - Daniel

On Mon, Oct 29, 2012 at 8:57 PM, Rafael EspĂ­ndola <
rafael.espindola at gmail.com> wrote:

> There is a lot of char* being passed around in the clang driver. At
> least part of that seems to be because we have an enum
> (llvm::Triple::ArchType) that can distinguish  an ARM from an X86, but
> we don't have an enum that can distinguish a ARMv6 form an ARMv7 for
> example.
>
> The attached patches add the enum llvm::Triple::CPUArch and use that
> to replace a long if chain in clang. I think it can be used in more
> places, but this should be sufficient to illustrate the idea.
>
> Cheers,
> Rafael
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20121031/cc139396/attachment.html>


More information about the cfe-commits mailing list