This is an archive of the discontinued LLVM Phabricator instance.

[ELF] writePlt: replace parameters gotPltEntryAddr and index with `const Symbol &`. NFC
ClosedPublic

Authored by MaskRay on Dec 17 2019, 2:32 PM.

Details

Diff Detail

Event Timeline

MaskRay created this revision.Dec 17 2019, 2:32 PM
grimar accepted this revision.Dec 17 2019, 11:39 PM

LGTM

lld/ELF/Arch/Mips.cpp
323

It is used only once in each branch, so perhaps just inline it?

This revision is now accepted and ready to land.Dec 17 2019, 11:39 PM
ruiu accepted this revision.Dec 17 2019, 11:46 PM

I think I like sym over s as a function parameter name whose scope is not very narrow, but except that LGTM.

MaskRay updated this revision to Diff 234466.Dec 18 2019, 12:10 AM
MaskRay marked an inline comment as done.
MaskRay retitled this revision from [ELF] writePLT: replace parameters gotPltEntryAddr and index with `const Symbol &`. NFC to [ELF] writePlt: replace parameters gotPltEntryAddr and index with `const Symbol &`. NFC.
MaskRay edited the summary of this revision. (Show Details)

s -> sym

MaskRay added inline comments.Dec 18 2019, 12:12 AM
lld/ELF/Arch/Mips.cpp
323

In Mips.cpp, the variable is used a lot. In other files, I try inlining it if not used often.

This revision was automatically updated to reflect the committed changes.