Page MenuHomePhabricator

[LTO] Improve readability of module IDs

Authored by ikudrin on Mon, May 13, 9:08 AM.



Module IDs can appear in diagnostic messages.
This patch adds some auxiliary symbols to improve their readability.

Diff Detail

rLLD LLVM Linker

Event Timeline

ikudrin created this revision.Mon, May 13, 9:08 AM
Herald added a project: Restricted Project. · View Herald Transcript
ormris added a subscriber: ormris.Mon, May 13, 10:02 AM

My minor concern is that the new message is a bit inconsistent with our other error messages I think.

For example, we have:
{{.*}}.a({{.*}}.o): corrupted ELF file: invalid data encoding

i.e. it is <archive name>(<object name>)

and in your message you have different format:

<archive name>:<offset>(<object name>)

So I would suggest to make it <archive name>(<object name> at <offset>) or <archive name>(<object name>:<offset>) probably.

I think Rui might have a opinion here about how the error message should look like.

ruiu added a comment.Tue, May 14, 6:39 AM

I think I agree with George. Looks like <archive name>(<object name> at <offset>) is slightly more readable than <archive name>(<object name>:<offset>), but that's not a strong preference.

ikudrin updated this revision to Diff 199580.Wed, May 15, 4:55 AM
  • Changed the format to <archive name>(<object name> at <offset>);
  • Changed "if" to "?:";
  • Simplified a check in the tests.
grimar accepted this revision.Wed, May 15, 5:01 AM


This revision is now accepted and ready to land.Wed, May 15, 5:01 AM
ruiu accepted this revision.Wed, May 15, 5:33 AM


ormris removed a subscriber: ormris.Wed, May 15, 9:20 AM
This revision was automatically updated to reflect the committed changes.