[PATCH] D37747: [MIPS] Fix PLT entries generation in case of linking regular and microMIPS code

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 27 21:25:09 PDT 2017


ruiu added inline comments.


================
Comment at: ELF/Arch/MipsArchTree.cpp:296
+  if (!Config->MipsEFlags) {
+    switch (Config->EKind) {
+    case ELF32LEKind:
----------------
atanasyan wrote:
> ruiu wrote:
> > I'd avoid dispatching based on Config->EKind. Can you initialize Config->EKind after all object files are ready?
> > I'd avoid dispatching based on Config->EKind. Can you initialize Config->EKind after all object files are ready?
> 
> Do you mean that we need an explicit guarantee that the `calcMipsEFlags` is called after the `Config->EKind` initialization? When I code this function I based on an implicit guarantee like in some other existing LLD routines.
> Do you mean that we need an explicit guarantee that the calcMipsEFlags is called after the Config->EKind initialization?

Yes, what I meant. Then you can remove this dispatch function, no?


Repository:
  rL LLVM

https://reviews.llvm.org/D37747





More information about the llvm-commits mailing list