[Driver] Expose getARMCPUForMArch() function in the Driver API; NFC.

llvm-svn: 212666
This commit is contained in:
Argyrios Kyrtzidis 2014-07-10 01:03:37 +00:00
parent 84e0223a9d
commit 1b49db6035
2 changed files with 15 additions and 3 deletions

View File

@ -13,6 +13,10 @@
#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

View 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")