[PATCH] D21779: [LTO] Infer EKind/EMachine from Bitcode files
Davide Italiano via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 27 19:38:48 PDT 2016
davide added inline comments.
================
Comment at: ELF/InputFiles.cpp:691
@@ -689,1 +690,3 @@
+static void setBitcodeMachineAttributes(MemoryBufferRef MB) {
+ auto Obj = check(IRObjectFile::create(MB, Driver->Context));
----------------
ruiu wrote:
> Instead of defining a special function for bitcode files, can you define `getElfKind` and `getMachineType` to BitcodeFile?
Sorry, maybe I'm misreading but you mean defining them as member functions of `class BitcodeFile` similarly to what happen in `class ELFFileBase`?
Or are you suggesting something else?
```
static ELFKind getELFKind();
const llvm::object::ELFFile<ELFT> &getObj() const { return ELFObj; }
llvm::object::ELFFile<ELFT> &getObj() { return ELFObj; }
uint16_t getEMachine() const { return getObj().getHeader()->e_machine; }
```
http://reviews.llvm.org/D21779
More information about the llvm-commits
mailing list