[PATCH] D52265: [PPC64] handle ppc64le triple in getBitcodeMachineKind

Sean Fertile via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 19 06:44:41 PDT 2018


sfertile created this revision.
sfertile added reviewers: ruiu, syzaara, MaskRay, rdhindsa.
Herald added subscribers: jsji, dexonsmith, steven_wu, kbarton, arichardson, nemanjai, emaste.
Herald added a reviewer: espindola.

enables lto/thinlto with bitcode targeting little endian PPC64


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D52265

Files:
  ELF/InputFiles.cpp
  test/ELF/lto/ppc64le.ll


Index: test/ELF/lto/ppc64le.ll
===================================================================
--- /dev/null
+++ test/ELF/lto/ppc64le.ll
@@ -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
+}
Index: ELF/InputFiles.cpp
===================================================================
--- ELF/InputFiles.cpp
+++ ELF/InputFiles.cpp
@@ -1071,6 +1071,7 @@
   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;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52265.166121.patch
Type: text/x-patch
Size: 720 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180919/bdb85d03/attachment.bin>


More information about the llvm-commits mailing list