From 425b24812867a46c0217d7d7fee253781a7b55c1 Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Tue, 27 Feb 2018 10:09:58 +0000 Subject: [ADT] Recognize ppc as valid architecture in target triple. Until this patch, only `powerpc` and `ppc32` were recognized as valid PowerPC 32-bit architectures in a target triple. This was incompatible with the triple `ppc-apple-darwin` as returned for libObject. I found out about this when working on a test case using a binary generated on an old PowerBook G4. We had the choice of either fix this in the Mach-O object parser or in the Triple implementation. I chose the latter because it feels like the most canonical place. Differential revision: https://reviews.llvm.org/D43760 llvm-svn: 326182 --- llvm/lib/Support/Triple.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/Support/Triple.cpp') diff --git a/llvm/lib/Support/Triple.cpp b/llvm/lib/Support/Triple.cpp index b54ed40f057..bd5743bdf15 100644 --- a/llvm/lib/Support/Triple.cpp +++ b/llvm/lib/Support/Triple.cpp @@ -384,7 +384,7 @@ static Triple::ArchType parseArch(StringRef ArchName) { // FIXME: Do we need to support these? .Cases("i786", "i886", "i986", Triple::x86) .Cases("amd64", "x86_64", "x86_64h", Triple::x86_64) - .Cases("powerpc", "ppc32", Triple::ppc) + .Cases("powerpc", "ppc", "ppc32", Triple::ppc) .Cases("powerpc64", "ppu", "ppc64", Triple::ppc64) .Cases("powerpc64le", "ppc64le", Triple::ppc64le) .Case("xscale", Triple::arm) -- cgit v1.2.3