forked from OSchip/llvm-project
Some missing usage of TargetParser. NFC.
llvm-svn: 278890
This commit is contained in:
parent
e2cc07bc0b
commit
56a837238d
|
@ -4901,7 +4901,7 @@ public:
|
|||
// the frontend matches that.
|
||||
if (Triple.getEnvironment() == llvm::Triple::EABI ||
|
||||
Triple.getOS() == llvm::Triple::UnknownOS ||
|
||||
StringRef(CPU).startswith("cortex-m")) {
|
||||
ArchProfile == llvm::ARM::PK_M) {
|
||||
setABI("aapcs");
|
||||
} else if (Triple.isWatchABI()) {
|
||||
setABI("aapcs16");
|
||||
|
@ -5230,7 +5230,7 @@ public:
|
|||
if (SoftFloat)
|
||||
Builder.defineMacro("__SOFTFP__");
|
||||
|
||||
if (CPU == "xscale")
|
||||
if (ArchKind == llvm::ARM::AK_XSCALE)
|
||||
Builder.defineMacro("__XSCALE__");
|
||||
|
||||
if (isThumb()) {
|
||||
|
|
|
@ -7465,11 +7465,14 @@ llvm::Triple::ArchType darwin::getArchTypeForMachOArchName(StringRef Str) {
|
|||
|
||||
void darwin::setTripleTypeForMachOArchName(llvm::Triple &T, StringRef Str) {
|
||||
const llvm::Triple::ArchType Arch = getArchTypeForMachOArchName(Str);
|
||||
unsigned ArchKind = llvm::ARM::parseArch(Str);
|
||||
T.setArch(Arch);
|
||||
|
||||
if (Str == "x86_64h")
|
||||
T.setArchName(Str);
|
||||
else if (Str == "armv6m" || Str == "armv7m" || Str == "armv7em") {
|
||||
else if (ArchKind == llvm::ARM::AK_ARMV6M ||
|
||||
ArchKind == llvm::ARM::AK_ARMV7M ||
|
||||
ArchKind == llvm::ARM::AK_ARMV7EM) {
|
||||
T.setOS(llvm::Triple::UnknownOS);
|
||||
T.setObjectFormat(llvm::Triple::MachO);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue