forked from OSchip/llvm-project
[Driver] Expose getARMCPUForMArch() function in the Driver API; NFC.
llvm-svn: 212666
This commit is contained in:
parent
84e0223a9d
commit
1b49db6035
|
@ -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
|
||||
|
||||
|
|
|
@ -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")
|
||||
|
|
Loading…
Reference in New Issue