[PATCH] code refactoring on ARMTargetInfo class

Alexandros Lamprineas alexandros.lamprineas at arm.com
Thu Jul 2 02:32:27 PDT 2015


================
Comment at: lib/Basic/Targets.cpp:4160
@@ +4159,3 @@
+    if (Triple.getSubArch() == llvm::Triple::SubArchType::NoSubArch)
+      setArchInfo("armv6j");
+    else 
----------------
rengolin wrote:
> This seems quite arbitrary... Couldn't you return an empty string?
If no subArch is specified then setArchInfo() cannot do much with an empty string. ArcKind will be set to invalid and getCPUAttr() will return an empty string. A regression will appear since __ARM_ARCH_6J__ won't be defined as expected. That ("armv6j") should be the corresponding subArch for the default CPU ("arm1136j-s") specified in the constructor.

http://reviews.llvm.org/D10839

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






More information about the cfe-commits mailing list