[PATCH] D52165: [RISCV] Support RISC-V in getBitcodeMachineKind

Kito Cheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 17 02:00:01 PDT 2018


kito-cheng created this revision.
kito-cheng added reviewers: PkmX, ruiu.
Herald added subscribers: llvm-commits, rkruppe, rogfer01, shiva0217, arichardson, emaste.
Herald added a reviewer: espindola.

This patch add Triple::riscv64 and Triple::riscv32 to getBitcodeMachineKind for get right e_machine.


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D52165

Files:
  ELF/InputFiles.cpp


Index: ELF/InputFiles.cpp
===================================================================
--- ELF/InputFiles.cpp
+++ ELF/InputFiles.cpp
@@ -1068,6 +1068,9 @@
     return EM_PPC;
   case Triple::ppc64:
     return EM_PPC64;
+  case Triple::riscv32:
+  case Triple::riscv64:
+    return EM_RISCV;
   case Triple::x86:
     return T.isOSIAMCU() ? EM_IAMCU : EM_386;
   case Triple::x86_64:


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52165.165722.patch
Type: text/x-patch
Size: 391 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180917/06d46d2c/attachment-0001.bin>


More information about the llvm-commits mailing list