[PATCH] D45248: [ELF] - Eliminate Target::isPicRel method.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 4 04:17:34 PDT 2018


grimar created this revision.
grimar added reviewers: ruiu, espindola.
Herald added subscribers: arichardson, javed.absar, sdardis, emaste.

As was mentioned in comments for https://reviews.llvm.org/D45158,
`isPicRel`'s name does not make much sense,
because what this method does is checks if
we need to create the dynamic relocation or not.

Instead of renaming it to something different,
I suggest eliminating 'isPicRel' completely.

We can reuse the `getDynRel` method.
They are logically very close, `getDynRel` can just return
Optional<> and that would simplify things and
avoid functionality correlation/duplication with 'isPicRel'.


https://reviews.llvm.org/D45248

Files:
  ELF/Arch/AArch64.cpp
  ELF/Arch/ARM.cpp
  ELF/Arch/Mips.cpp
  ELF/Arch/X86.cpp
  ELF/Arch/X86_64.cpp
  ELF/Relocations.cpp
  ELF/Target.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45248.140929.patch
Type: text/x-patch
Size: 7020 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180404/524f0859/attachment.bin>


More information about the llvm-commits mailing list