This is an archive of the discontinued LLVM Phabricator instance.

[ELF] - Remove VersionScriptParser class and move the members to ScriptParser
ClosedPublic

Authored by grimar on Aug 22 2016, 8:28 AM.

Details

Summary

Patch removes VersionScriptParser class and moves the members to ScriptParser

This was requested in review comments for D23609, D23660.

It opens road for implementation of VERSION linkerscript command.

Diff Detail

Repository
rL LLVM

Event Timeline

grimar updated this revision to Diff 68865.Aug 22 2016, 8:28 AM
grimar retitled this revision from to [ELF] - Remove VersionScriptParser class and move the members to ScriptParser.
grimar updated this object.
grimar added a reviewer: ruiu.
grimar updated this object.
grimar added subscribers: llvm-commits, davide, evgeny777, grimar.
ruiu added inline comments.Aug 29 2016, 5:02 PM
ELF/LinkerScript.cpp
583–586 ↗(On Diff #68865)

Instead of adding another parameter to the constructor, add another entry point function than run. Actually I'd rename run parseLinkerScript and add parseVersionScript.

626–629 ↗(On Diff #68865)

What's the difference between read prefix and parse prefix? If there's no reason, rename them to start with read.

1389 ↗(On Diff #68865)

Remove this empty line.

grimar updated this revision to Diff 69678.Aug 30 2016, 7:35 AM
  • Addressed review comments.
grimar added inline comments.Aug 30 2016, 7:37 AM
ELF/LinkerScript.cpp
583–586 ↗(On Diff #68865)

Done.

626–629 ↗(On Diff #68865)

Done.

1389 ↗(On Diff #68865)

Done.

rafael accepted this revision.Aug 30 2016, 11:11 AM
rafael added a reviewer: rafael.
rafael added a subscriber: rafael.

Fine by me, but wait for a final OK from Rui.

ELF/LinkerScript.cpp
593–596 ↗(On Diff #69678)

Given the other names, maybe readLinkerScript and readVersionScript?

1411 ↗(On Diff #69678)

The comment is out of date, no? We can probably delete it.

This revision is now accepted and ready to land.Aug 30 2016, 11:11 AM
ruiu accepted this revision.Aug 30 2016, 11:28 AM
ruiu edited edge metadata.

LGTM

ELF/LinkerScript.cpp
1411 ↗(On Diff #69678)

Yeah, it is I think out of date.

1415 ↗(On Diff #69678)

parse -> read for the sake of consistency.

This revision was automatically updated to reflect the committed changes.