From aaf6221d782afa8de9235678f10f95e8552c64ff Mon Sep 17 00:00:00 2001
From: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Date: Tue, 20 Jan 2015 00:09:16 -0800
Subject: [PATCH] Default to fragile ObjC runtime when targeting darwin/ppc

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
---
 clang/lib/Driver/ToolChains/Darwin.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/clang/lib/Driver/ToolChains/Darwin.h b/clang/lib/Driver/ToolChains/Darwin.h
index 64c252efea7d..74433dc05cce 100644
--- a/clang/lib/Driver/ToolChains/Darwin.h
+++ b/clang/lib/Driver/ToolChains/Darwin.h
@@ -227,8 +227,10 @@ public:
   bool IsEncodeExtendedBlockSignatureDefault() const override { return true; }
 
   bool IsObjCNonFragileABIDefault() const override {
-    // Non-fragile ABI is default for everything but i386.
-    return getTriple().getArch() != llvm::Triple::x86;
+    // Non-fragile ABI is default for legacy architectures
+    return getTriple().getArch() != llvm::Triple::x86 &&
+           getTriple().getArch() != llvm::Triple::ppc &&
+           getTriple().getArch() != llvm::Triple::ppc64;
   }
 
   bool UseObjCMixedDispatch() const override { return true; }
-- 
2.37.2

