Page MenuHomePhabricator

[llvm-readobj] Add new helper function `getSymbolVersionByIndex()`

Authored by Higuoxing on Mar 19 2019, 7:35 AM.



When implementing GNU style dumper for .gnu.version section, we should find symbol version name by vs_index.

Diff Detail


Event Timeline

Higuoxing created this revision.Mar 19 2019, 7:35 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 19 2019, 7:35 AM
Higuoxing updated this revision to Diff 191304.Mar 19 2019, 7:52 AM

Format codes.

Higuoxing planned changes to this revision.Mar 19 2019, 7:58 AM
Higuoxing updated this revision to Diff 192434.Mar 27 2019, 6:24 AM

Little cleanup.

rupprecht accepted this revision.Mar 27 2019, 11:58 AM
This revision is now accepted and ready to land.Mar 27 2019, 11:58 AM
jhenderson added inline comments.Mar 28 2019, 3:09 AM
650 ↗(On Diff #192434)

You don't need to do this now, but could you in a separate patch please replace dot_gnu_version_sec and similar with LLVM-style names?

672 ↗(On Diff #192434)

I think it's more in keeping with existing style not to bother with the const on non-reference parameters.

682 ↗(On Diff #192434)

Nit: missing full stop.

688 ↗(On Diff #192434)


700 ↗(On Diff #192434)

Is std::string the right type to be returning here? This is a pointer into an existing block of strings, so I'd think a StringRef would be sufficient.

Higuoxing updated this revision to Diff 192609.Mar 28 2019, 4:38 AM
jhenderson accepted this revision.Mar 28 2019, 4:44 AM

Two nits, otherwise LGTM.

678 ↗(On Diff #192609)

I don't think you need to be explicit here. String literals should harmlessly convert to StringRef.

699 ↗(On Diff #192609)

Ditto. Not sure you need to be explicit.

Higuoxing updated this revision to Diff 192613.Mar 28 2019, 5:12 AM
  • Addressed comments
This revision was automatically updated to reflect the committed changes.

Sorry, this is my first time use git-svn, I pushed 3 times for a patch ...