[PATCH] D21779: [LTO] Infer EKind/EMachine from Bitcode files
Sean Silva via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 27 21:56:58 PDT 2016
silvas added a subscriber: silvas.
================
Comment at: ELF/InputFiles.cpp:708
@@ +707,3 @@
+ std::string ArchName = TheTriple.getArchName();
+ if (ArchName == "aarch64")
+ Config->EMachine = EM_AARCH64;
----------------
This seems really error-prone and likely to cause a long tail of bugs where we need to add stuff to the list (at the very least there should be a fatal error if we cannot infer). Think about it this way: ideally we will get the EMachine from the LTO object file later, but we need it earlier.
Can we somehow call into LLVM to get this information from MC? Maybe Rafael would know.
http://reviews.llvm.org/D21779
More information about the llvm-commits
mailing list