[PATCH] D54619: [ELF] - Refactor getRelocTargetVA(). NFC.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 16 00:51:18 PST 2018


grimar created this revision.
grimar added a reviewer: ruiu.
Herald added subscribers: arichardson, emaste.
Herald added a reviewer: espindola.

Currently `getRelocTargetVA` handles relocation expressions
for all targets at once, mixing the common expressions and
target-specific expressions.

This approach has noticeable disadvantages:

1. When debugging the code for some target, expressions specific

to other targets are unuseful. It is harder to read when logic for all kinds
of target specific code is mixed in one place.

2. If we do a mistake in code and will use expression specific for target A

for target B, current code would not catch that. It's perhaps unlikely to happen,
but still not as safe/isolated as it could be.


https://reviews.llvm.org/D54619

Files:
  ELF/InputSection.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54619.174338.patch
Type: text/x-patch
Size: 7338 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181116/bc01cace/attachment.bin>


More information about the llvm-commits mailing list