This is an archive of the discontinued LLVM Phabricator instance.

[ELF] - Refactor of Writer<ELFT>::forEachRelSec.
ClosedPublic

Authored by grimar on Sep 12 2017, 8:02 AM.

Details

Summary

There is no need to scan over all input sections for relocatable output.
As we do not process or scan relocations anyways.
Patch moves check for Config->Relocatable out to avoid that and also removes
excessive check for isa<EhInputSection> from first for loop.
It is excessive because we handle all of them in a second for loop below.
That all allowed to simplify code.

Diff Detail

Repository
rL LLVM

Event Timeline

grimar created this revision.Sep 12 2017, 8:02 AM
grimar edited the summary of this revision. (Show Details)Sep 12 2017, 8:03 AM
ruiu accepted this revision.Sep 12 2017, 10:09 AM

LGTM

This revision is now accepted and ready to land.Sep 12 2017, 10:09 AM
This revision was automatically updated to reflect the committed changes.