]> granicus.if.org Git - clang/commitdiff
[Driver] Expose getARMCPUForMArch() function in the Driver API; NFC.
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Thu, 10 Jul 2014 01:03:37 +0000 (01:03 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Thu, 10 Jul 2014 01:03:37 +0000 (01:03 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212666 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Driver/Util.h
lib/Driver/Tools.cpp

index b24b9904f2b56e5e78b5ff7d7bf20988f05543f1..c671ca47a27fb9d0d9277308f39196a202b21e44 100644 (file)
 #include "clang/Basic/LLVM.h"
 #include "llvm/ADT/DenseMap.h"
 
+namespace llvm {
+  class Triple;
+}
+
 namespace clang {
 class DiagnosticsEngine;
 
@@ -26,6 +30,9 @@ namespace driver {
   /// ActionList - Type used for lists of actions.
   typedef SmallVector<Action*, 3> ActionList;
 
+/// Get the (LLVM) name of the minimum ARM CPU for the arch we are targeting.
+const char* getARMCPUForMArch(StringRef MArch, const llvm::Triple &Triple);
+
 } // end namespace driver
 } // end namespace clang
 
index 0d601a6bcdf027b6de2c2d5205121eb30e6f41f8..8fc3525d445d47df88480e985b8a37b87b3d6540 100644 (file)
@@ -5025,9 +5025,6 @@ void hexagon::Link::ConstructJob(Compilation &C, const JobAction &JA,
 }
 // Hexagon tools end.
 
-/// getARMCPUForMArch - Get the (LLVM) name of the minimum ARM CPU for the arch we are targeting
-//
-// FIXME: tblgen this.
 const char *arm::getARMCPUForMArch(const ArgList &Args,
                                    const llvm::Triple &Triple) {
   StringRef MArch;
@@ -5049,6 +5046,14 @@ const char *arm::getARMCPUForMArch(const ArgList &Args,
     }
   }
 
+  return driver::getARMCPUForMArch(MArch, Triple);
+}
+
+/// Get the (LLVM) name of the minimum ARM CPU for the arch we are targeting.
+//
+// FIXME: tblgen this.
+const char *driver::getARMCPUForMArch(StringRef MArch,
+                                      const llvm::Triple &Triple) {
   switch (Triple.getOS()) {
   case llvm::Triple::NetBSD:
     if (MArch == "armv6")