This is an archive of the discontinued LLVM Phabricator instance.

Simplify ObjFile::createDefined().
AcceptedPublic

Authored by ruiu on Jul 24 2018, 3:27 PM.

Details

Reviewers
pcc
Summary

Since readAssociativeDefinition is called again for every symbol,
we don't need to do anything on the first iteration.

Event Timeline

ruiu created this revision.Jul 24 2018, 3:27 PM
pcc added inline comments.Jul 24 2018, 3:44 PM
lld/COFF/InputFiles.cpp
258–259

With this change, this comment is no longer accurate. I believe that we now add all symbols in associative sections to the pending list.

275

Since this is now the only caller you could inline the body here.

ruiu updated this revision to Diff 157166.Jul 24 2018, 4:23 PM
  • update comment
lld/COFF/InputFiles.cpp
275

I tried that but the indentation of the new code looked too deep, so I'd like to keep it as-is.

pcc accepted this revision.Jul 24 2018, 4:48 PM

LGTM

lld/COFF/InputFiles.cpp
259

associative

Or a section definition symbol for a comdat leader, still.

260

These symbols are processed

264

a comdat symbol

This revision is now accepted and ready to land.Jul 24 2018, 4:48 PM