Hi Rafael, This looks like a reasonable goal, but obviously the ARM architecture being quite modular there are a lot more actual variants (and a huge number more "potential" variants) than for other CPUs (and those listed in the table). Is there any nice mechanism for checking if an enum is one of a list of enum-values in the clang codebase?
Anyway, if this goes in we'll probably need to keep patching up both the enum and the string-mapping as new use cases are discovered. Cheers, Dave -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Rafael Espíndola Sent: 30 October 2012 03:58 To: llvm cfe Subject: [cfe-commits] [patch] Add a llvm::Triple::CPUArch enum 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 _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
