[PPC64] Handle ppc64le triple in getBitcodeMachineKind.

Enables lto and thinlto with bitcode targeting ppc64le.

Differential Revision: https://reviews.llvm.org/D52265

llvm-svn: 342604
This commit is contained in:
Sean Fertile 2018-09-20 00:26:49 +00:00
parent e0e586b997
commit 69e09116ba
2 changed files with 13 additions and 0 deletions

View File

@ -1071,6 +1071,7 @@ static uint8_t getBitcodeMachineKind(StringRef Path, const Triple &T) {
case Triple::ppc:
return EM_PPC;
case Triple::ppc64:
case Triple::ppc64le:
return EM_PPC64;
case Triple::x86:
return T.isOSIAMCU() ? EM_IAMCU : EM_386;

View File

@ -0,0 +1,12 @@
; REQUIRES: ppc
; RUN: llvm-as %s -o %t.o
; RUN: ld.lld %t.o -o %t
target datalayout = "e-m:e-i64:64-n32:64"
target triple = "powerpc64le-unknown-linux-gnu"
define void @__start() {
entry:
ret void
}