Clean up ARM subtarget code by using Triple ADT.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123276 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evan Cheng
2011-01-11 21:46:47 +00:00
parent a36478feac
commit b72d2a92b7
6 changed files with 16 additions and 14 deletions

View File

@@ -13,6 +13,7 @@
#include "ARMSubtarget.h"
#include "ARMGenSubtarget.inc"
#include "ARMBaseRegisterInfo.h"
#include "llvm/GlobalValue.h"
#include "llvm/Target/TargetOptions.h"
#include "llvm/Support/CommandLine.h"
@@ -56,7 +57,7 @@ ARMSubtarget::ARMSubtarget(const std::string &TT, const std::string &FS,
, AllowsUnalignedMem(false)
, stackAlignment(4)
, CPUString("generic")
, TargetType(isELF) // Default to ELF unless otherwise specified.
, TargetTriple(TT)
, TargetABI(ARM_ABI_APCS) {
// Default to soft float ABI
if (FloatABIType == FloatABI::Default)
@@ -118,12 +119,6 @@ ARMSubtarget::ARMSubtarget(const std::string &TT, const std::string &FS,
}
}
if (Len >= 10) {
if (TT.find("-darwin") != std::string::npos)
// arm-darwin
TargetType = isDarwin;
}
if (TT.find("eabi") != std::string::npos)
TargetABI = ARM_ABI_AAPCS;