This is an archive of the discontinued LLVM Phabricator instance.

[ELF] - Add Id field to Version struct.
ClosedPublic

Authored by grimar on Jul 7 2016, 3:20 AM.

Details

Summary

That helps to avoid expressions like I + 2 in code
that assigns version number to symbols.

Change was suggested by Rui Ueyama.

Diff Detail

Repository
rL LLVM

Event Timeline

grimar updated this revision to Diff 63046.Jul 7 2016, 3:20 AM
grimar updated this revision to Diff 63047.
grimar retitled this revision from to [ELF] - Add Id field to Version struct..
grimar updated this object.
grimar added reviewers: ruiu, rafael.
grimar added subscribers: llvm-commits, grimar.
  • Fixed comment.
rafael accepted this revision.Jul 8 2016, 9:24 AM
rafael edited edge metadata.

LGTM

This revision is now accepted and ready to land.Jul 8 2016, 9:24 AM
ruiu accepted this revision.Jul 8 2016, 10:54 AM
ruiu edited edge metadata.

LGTM

ELF/Config.h
45 ↗(On Diff #63047)

I'd move this after Name so that Name and Id (arguments passed by user) are next to each other.

ELF/SymbolListFile.cpp
88 ↗(On Diff #63047)

s/by/for/

grimar updated this revision to Diff 63484.Jul 11 2016, 3:54 AM
grimar edited edge metadata.

After rebasing I had to modify that patch. I had to introduce createSymbolVersion() method,
that creates new version entry in one place. So could this change be reviewed before I commit please ?

Lgtm, but define it as

Lld::createSymbolVersion

Cheers,
Rafael

ruiu added a comment.Jul 11 2016, 1:37 PM

LGTM

ELF/SymbolListFile.cpp
85 ↗(On Diff #63484)

I'd name this defineSymbolVersion.

ELF/SymbolTable.cpp
33 ↗(On Diff #63484)

This should be in a .h file.

This revision was automatically updated to reflect the committed changes.

Lgtm, but define it as

Lld::createSymbolVersion

Cheers,
Rafael

Ok, after moving to .h it is under lld::elf namespace.