diff options
author | Tim Northover <tnorthover@apple.com> | 2014-07-23 12:32:47 +0000 |
---|---|---|
committer | Tim Northover <tnorthover@apple.com> | 2014-07-23 12:32:47 +0000 |
commit | e19bed7d33f1e3083fe48edc7627f8b961848e3f (patch) | |
tree | 941a3a2e3d878810d48fcd7cde0c3a173d390a1a /llvm/lib/MC/MCObjectFileInfo.cpp | |
parent | 54d8ee6d7b5843c7850e0c1f4ae702f1b810fb5c (diff) | |
download | bcm5719-llvm-e19bed7d33f1e3083fe48edc7627f8b961848e3f.tar.gz bcm5719-llvm-e19bed7d33f1e3083fe48edc7627f8b961848e3f.zip |
AArch64: remove arm64 triple enumerator.
Having both Triple::arm64 and Triple::aarch64 is extremely confusing, and
invites bugs where only one is checked. In reality, the only legitimate
difference between the two (arm64 usually means iOS) is also present in the OS
part of the triple and that's what should be checked.
We still parse the "arm64" triple, just canonicalise it to Triple::aarch64, so
there aren't any LLVM-side test changes.
llvm-svn: 213743
Diffstat (limited to 'llvm/lib/MC/MCObjectFileInfo.cpp')
-rw-r--r-- | llvm/lib/MC/MCObjectFileInfo.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/llvm/lib/MC/MCObjectFileInfo.cpp b/llvm/lib/MC/MCObjectFileInfo.cpp index d490ef30b69..990938edd04 100644 --- a/llvm/lib/MC/MCObjectFileInfo.cpp +++ b/llvm/lib/MC/MCObjectFileInfo.cpp @@ -24,7 +24,7 @@ static bool useCompactUnwind(const Triple &T) { return false; // aarch64 always has it. - if (T.getArch() == Triple::arm64 || T.getArch() == Triple::aarch64) + if (T.getArch() == Triple::aarch64) return true; // Use it on newer version of OS X. @@ -43,8 +43,7 @@ void MCObjectFileInfo::InitMachOMCObjectFileInfo(Triple T) { // MachO SupportsWeakOmittedEHFrame = false; - if (T.isOSDarwin() && - (T.getArch() == Triple::arm64 || T.getArch() == Triple::aarch64)) + if (T.isOSDarwin() && T.getArch() == Triple::aarch64) SupportsCompactUnwindWithoutEHFrame = true; PersonalityEncoding = dwarf::DW_EH_PE_indirect | dwarf::DW_EH_PE_pcrel @@ -178,7 +177,7 @@ void MCObjectFileInfo::InitMachOMCObjectFileInfo(Triple T) { if (T.getArch() == Triple::x86_64 || T.getArch() == Triple::x86) CompactUnwindDwarfEHFrameOnly = 0x04000000; - else if (T.getArch() == Triple::arm64 || T.getArch() == Triple::aarch64) + else if (T.getArch() == Triple::aarch64) CompactUnwindDwarfEHFrameOnly = 0x03000000; } @@ -321,8 +320,6 @@ void MCObjectFileInfo::InitELFMCObjectFileInfo(Triple T) { break; case Triple::aarch64: case Triple::aarch64_be: - case Triple::arm64: - case Triple::arm64_be: // The small model guarantees static code/data size < 4GB, but not where it // will be in memory. Most of these could end up >2GB away so even a signed // pc-relative 32-bit address is insufficient, theoretically. @@ -827,7 +824,7 @@ void MCObjectFileInfo::InitMCObjectFileInfo(StringRef T, Reloc::Model relocm, // cellspu-apple-darwin. Perhaps we should fix in Triple? if ((Arch == Triple::x86 || Arch == Triple::x86_64 || Arch == Triple::arm || Arch == Triple::thumb || - Arch == Triple::arm64 || Arch == Triple::aarch64 || + Arch == Triple::aarch64 || Arch == Triple::ppc || Arch == Triple::ppc64 || Arch == Triple::UnknownArch) && (TT.isOSDarwin() || TT.isOSBinFormatMachO())) { |