[PATCH] D34618: [LLD] Add basic 64-bit SPARC support

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 27 08:49:50 PDT 2017


ruiu added a comment.

Can you rebase this patch and fix these comments?



================
Comment at: lld/ELF/SyntheticSections.cpp:1093
     add({DT_PLTRELSZ, In<ELFT>::RelaPlt->getParent()->Size});
-    add({Config->EMachine == EM_MIPS ? DT_MIPS_PLTGOT : DT_PLTGOT,
-         InX::GotPlt});
+    switch (Config->EMachine) {
+    case EM_MIPS:
----------------
fedor.sergeev wrote:
> kettenis wrote:
> > ruiu wrote:
> > > nit: since there are only three choices, I'd do it with if ~ else if ~ else ~.
> > I think the switch here is better. Future support for 32-bit SPARC would straightforward that way.
> Agreed, please, keep the switch.
I have a different taste. I think if ~ else if ~ else is better (and you can convert to switch later), but since it's not important, I'm ok in either way.


https://reviews.llvm.org/D34618





More information about the llvm-commits mailing list