diff options
author | Tilmann Scheller <tilmann.scheller@googlemail.com> | 2013-09-02 17:09:01 +0000 |
---|---|---|
committer | Tilmann Scheller <tilmann.scheller@googlemail.com> | 2013-09-02 17:09:01 +0000 |
commit | 195dd8a1ce38970e3463ee1425647280373b60a7 (patch) | |
tree | 0afe7752d21cdce79298c346f6620337dfd2f86a /lib/Target/ARM | |
parent | 5bed440eb13b4104b64fa9c557954f335aac2aab (diff) | |
download | external_llvm-195dd8a1ce38970e3463ee1425647280373b60a7.zip external_llvm-195dd8a1ce38970e3463ee1425647280373b60a7.tar.gz external_llvm-195dd8a1ce38970e3463ee1425647280373b60a7.tar.bz2 |
ARM: Default to the Swift CPU when targeting armv7s/thumbv7s.
Test cases adjusted accordingly.
This fixes rdar://14871821.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189766 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM')
-rw-r--r-- | lib/Target/ARM/ARMSubtarget.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/Target/ARM/ARMSubtarget.cpp b/lib/Target/ARM/ARMSubtarget.cpp index 3111f5e..e9254c3 100644 --- a/lib/Target/ARM/ARMSubtarget.cpp +++ b/lib/Target/ARM/ARMSubtarget.cpp @@ -133,8 +133,13 @@ void ARMSubtarget::resetSubtargetFeatures(const MachineFunction *MF) { } void ARMSubtarget::resetSubtargetFeatures(StringRef CPU, StringRef FS) { - if (CPUString.empty()) - CPUString = "generic"; + if (CPUString.empty()) { + if (isTargetIOS() && TargetTriple.getArchName().endswith("v7s")) + // Default to the Swift CPU when targeting armv7s/thumbv7s. + CPUString = "swift"; + else + CPUString = "generic"; + } // Insert the architecture feature derived from the target triple into the // feature string. This is important for setting features that are implied |