[ADT] Recognize ppc as valid architecture in target triple.
authorJonas Devlieghere <jonas@devlieghere.com>
Tue, 27 Feb 2018 10:09:58 +0000 (10:09 +0000)
committerJonas Devlieghere <jonas@devlieghere.com>
Tue, 27 Feb 2018 10:09:58 +0000 (10:09 +0000)
commit425b24812867a46c0217d7d7fee253781a7b55c1
tree04269d67a895e218437d893902df5659cd3924d0
parent1807c516c77eb2b66ee84cba56435897c913812d
[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
llvm/unittests/ADT/TripleTest.cpp