[PATCH] Fix -mthumb resetting of target cpu

Tim Northover t.p.northover at gmail.com
Wed Oct 30 07:04:26 PDT 2013

  Hi Bernie,

  Those FIXMEs are a little disturbing. Could you file a bug for the issue ("-target arm-B -march=armA" != "-target armA-B"?) when this gets committed?



Comment at: lib/Driver/ToolChain.cpp:183-184
@@ -182,4 +182,4 @@
   const char *result = llvm::StringSwitch<const char *>(MArch)
     .Cases("armv2", "armv2a","arm2")
     .Case("armv3", "arm6")
I think these two switches really should be combined into something like getARMCPUForMArch (in Tools.h/Tools.cpp?). The others Renato mentioned are doing slightly different things and might be candidates for a more involved solution, but these appear to be near-identical.

Reviewing the additions is made significantly more difficult by the different order.


More information about the cfe-commits mailing list