[PATCH] Move logic from llvm::Triple::getARMCPUForArch to driver::tools::arm::getARMCPUForMArch

Renato Golin renato.golin at linaro.org
Thu Mar 26 09:58:17 PDT 2015


If the out-of-line is in LLVM, then there's no way of knowing this is the only user. Any other front-end of separate project can be using it, unfortunately.

Being so, don't add this into Clang and lets refactor this in LLVM.

A move to clean up that mess should be done once we have a common target description and warning for at least one release.


================
Comment at: lib/Driver/Tools.cpp:5544
@@ -5543,2 +5543,3 @@
 
-  return Triple.getARMCPUForArch(MArch);
+  switch (Triple.getOS()) {
+  case llvm::Triple::FreeBSD:
----------------
dschuff wrote:
> rengolin wrote:
> > Move this switch inside the identical one below, after the StringSwitch.
> I don't think that will work. This logic is supposed to override the StringSwitch; e.g. if the OS is FreeBSD and MArch is "armv6" then the CPU is supposed to be "arm1176jzf-s" but if this switch is moved, then the StringSwitch logic will return "arm1136jf-s"
The string switch will only return arm1136 if the string is "armv6", I thought you said your string was "arm".

the whole point of the switch below is to catch all the rest, and that's what it seems your case is.

http://reviews.llvm.org/D8622

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list