[PATCH] D45642: [PPC64] V2 abi: Add glink section for lazy symbol resolution.
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 8 11:23:06 PDT 2018
ruiu added inline comments.
================
Comment at: ELF/SyntheticSections.cpp:926
Target->GotPltEntrySize,
- Config->EMachine == EM_ARM ? ".got" : ".got.plt") {}
+ Config->EMachine == EM_ARM ? ".got" :
+ Config->EMachine == EM_PPC64 ? ".plt" :
----------------
sfertile wrote:
> I used clang-format on this but didn't like the result:
>
> ```
> Config->EMachine == EM_ARM
> ? ".got"
> : Config->EMachine == EM_PPC64 ? ".plt"
> : ".got.plt") {}
>
> ```
>
> So I manually formatted, does anyone have a preference on this?
Maybe, I wouldn't fix what clang-format formatted by hand, because otherwise when I edit it next time, clang-format would try to change the format again, and I'd have to fix it by hand again. It seems to be better to not fight against the tool.
That said, I might factor this out as a static (file local) function `getIgotPltName()` which returns a StringRef for a chosen target, so that I don't need to write a cascading ?: expressionsas an initializer expression.
Repository:
rLLD LLVM Linker
https://reviews.llvm.org/D45642
More information about the llvm-commits
mailing list