From 32b14f80c27f86e6d146cf711db5bedda69e831c Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Fri, 20 Jun 2014 22:40:55 +0000 Subject: [PATCH] Use compact unwind for the iOS simulator. Another step in fixing pr19185. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211416 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/MC/MCObjectFileInfo.cpp | 5 +++++ test/MC/X86/no-elf-compact-unwind.s | 1 + 2 files changed, 6 insertions(+) diff --git a/lib/MC/MCObjectFileInfo.cpp b/lib/MC/MCObjectFileInfo.cpp index ebc67acf4cc..971b1a6e40b 100644 --- a/lib/MC/MCObjectFileInfo.cpp +++ b/lib/MC/MCObjectFileInfo.cpp @@ -31,6 +31,11 @@ static bool useCompactUnwind(const Triple &T) { if (T.isMacOSX() && !T.isMacOSXVersionLT(10, 6)) return true; + // And the iOS simulator. + if (T.isiOS() && + (T.getArch() == Triple::x86_64 || T.getArch() == Triple::x86)) + return true; + return false; } diff --git a/test/MC/X86/no-elf-compact-unwind.s b/test/MC/X86/no-elf-compact-unwind.s index 017c52ae9f3..4e9236b8797 100644 --- a/test/MC/X86/no-elf-compact-unwind.s +++ b/test/MC/X86/no-elf-compact-unwind.s @@ -1,4 +1,5 @@ // RUN: llvm-mc < %s -filetype=obj -triple x86_64-apple-macosx10.8.0 | llvm-readobj -s | FileCheck -check-prefix=MACHO %s +// RUN: llvm-mc < %s -filetype=obj -triple x86_64-apple-ios7.0.0 | llvm-readobj -s | FileCheck -check-prefix=MACHO %s // RUN: llvm-mc < %s -filetype=obj -triple x86_64-unknown-linux | llvm-readobj -s | FileCheck -check-prefix=ELF %s .globl __Z3barv