This is an archive of the discontinued LLVM Phabricator instance.

[ELF] - Eliminate Lazy class.
ClosedPublic

Authored by grimar on Mar 30 2018, 6:12 AM.

Details

Summary

I am not sure why we have Lazy class, it seems to be an
excessive layer that only complicates things and does not
bring something very useful. I think we can remove it,
patch do that.

Diff Detail

Repository
rLLD LLVM Linker

Event Timeline

grimar created this revision.Mar 30 2018, 6:12 AM
espindola accepted this revision.Apr 2 2018, 3:23 PM

LGTM. It does seem a bit simpler.

Rui, do you agree?

This revision is now accepted and ready to land.Apr 2 2018, 3:23 PM
ruiu added a comment.Apr 2 2018, 3:44 PM

Generally looking good.

ELF/SymbolTable.cpp
583

Please don't use auto.

ELF/SymbolTable.h
80–82

I don't think they are good name. Maybe each name makes sense, but we should avoid naming two functions very similar names. I'd just inline fetchLazy.

ELF/Symbols.h
251–253

"represents a symbols" -> "represent a symbol"

grimar updated this revision to Diff 140755.Apr 3 2018, 4:21 AM
grimar marked 3 inline comments as done.
  • Addressed review comments.
  • Updated implementation slightly.
grimar edited the summary of this revision. (Show Details)Apr 3 2018, 4:21 AM
ruiu accepted this revision.Apr 3 2018, 9:46 AM

LGTM

ELF/Driver.cpp
1084–1094

This is a bit worse than before, but I'll fix this after you commit it.

ELF/SymbolTable.cpp
583

Remove else

This revision was automatically updated to reflect the committed changes.