From b9c5258d8dabe270391ca5dcfedc0b166cfe74db Mon Sep 17 00:00:00 2001
From: Iain Sandoe <iain@sandoe.co.uk>
Date: Sun, 22 May 2016 17:23:05 +0100
Subject: [PATCH] [llvm, Darwin, PPC] Allow 'ppc' as an internal arch
 name.

This is a compromise; although the arch is ppc, the user-visible triple is called powerpc-apple-darwin.  However, within llvm the arch portion of the triple is often compared with the user's value for "-arch" (where the correct spelling is 'ppc').  I guess we should invent a "normalise triple for presentation to the user" function.
---
 llvm/lib/Object/MachOObjectFile.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/llvm/lib/Object/MachOObjectFile.cpp b/llvm/lib/Object/MachOObjectFile.cpp
index f595705935e..286953ac3aa 100644
--- a/llvm/lib/Object/MachOObjectFile.cpp
+++ b/llvm/lib/Object/MachOObjectFile.cpp
@@ -2624,6 +2624,8 @@ Triple MachOObjectFile::getArchTriple(uint32_t CPUType, uint32_t CPUSubType,
   case MachO::CPU_TYPE_POWERPC:
     switch (CPUSubType & ~MachO::CPU_SUBTYPE_MASK) {
     case MachO::CPU_SUBTYPE_POWERPC_ALL:
+    case MachO::CPU_SUBTYPE_POWERPC_7400:
+    case MachO::CPU_SUBTYPE_POWERPC_7450:
       if (ArchFlag)
         *ArchFlag = "ppc";
       return Triple("ppc-apple-darwin");
