[PATCH] D21277: Resubmit r270688: Using new TargetParser in Clang.

Saleem Abdulrasool via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 13 09:22:49 PDT 2016


compnerd added a subscriber: compnerd.

================
Comment at: lib/Basic/Targets.cpp:5709
@@ -5715,1 +5708,3 @@
+
+    return false;
   }
----------------
Please collapse this:

    return Name == "generic" || llvm::AArch64::parseCPUArch(Name) != llvm::ARM::AK_INVALID;

================
Comment at: lib/Driver/Tools.cpp:2303
@@ +2302,3 @@
+    const char *FeatureName = llvm::AArch64::getArchExtFeature(Feature);
+    if (FeatureName)
+      Features.push_back(FeatureName);
----------------
I think that you should use the scoped if here:

    if (const char *FeatureName = llvm::AArch64::getArchExtFeature(Feature))
      Features.push_back(FeatureName);

================
Comment at: lib/Driver/Tools.cpp:2324
@@ +2323,3 @@
+    unsigned ArchKind = llvm::AArch64::parseCPUArch(CPU);
+    unsigned Extersion = llvm::AArch64::getDefaultExtensions(CPU,ArchKind);
+
----------------
NIT: Space after the comma.

================
Comment at: lib/Driver/Tools.cpp:2326
@@ +2325,3 @@
+
+    if (!llvm::AArch64::getExtensionFeatures(Extersion,Features))
+      return false;
----------------
And here


Repository:
  rL LLVM

http://reviews.llvm.org/D21277





More information about the cfe-commits mailing list