[PATCH] D21779: [LTO] Infer EKind/EMachine from Bitcode files
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 28 01:06:56 PDT 2016
grimar added inline comments.
================
Comment at: ELF/InputFiles.cpp:699
@@ +698,3 @@
+ if (!T)
+ fatal("target not found: " + Msg);
+ const DataLayout &DL = M.getDataLayout();
----------------
Seems you're not using the T.
What about
```
if (!TargetRegistry::lookupTarget(TripleStr, Msg))
fatal("target not found: " + Msg);
```
================
Comment at: ELF/InputFiles.cpp:703
@@ +702,3 @@
+ bool Is64Bits = TheTriple.isArch64Bit();
+ if (IsLE)
+ Config->EKind = (Is64Bits) ? ELF64LEKind : ELF32LEKind;
----------------
You're using IsLE and DL only once, I think this can be replaced with
```
if (M.getDataLayout().isLittleEndian())
```
http://reviews.llvm.org/D21779
More information about the llvm-commits
mailing list