Page MenuHomePhabricator

[ELF] Fix finding the location in messages for undefined hidden symbols.
ClosedPublic

Authored by ikudrin on Jul 30 2019, 11:16 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

ikudrin created this revision.Jul 30 2019, 11:16 PM
Herald added a project: Restricted Project. · View Herald Transcript
ruiu added inline comments.Jul 30 2019, 11:59 PM
Common/ErrorHandler.cpp
99 ↗(On Diff #212508)

Or maybe you can relax this parentheses to \S+.

MaskRay added inline comments.Jul 31 2019, 12:09 AM
Common/ErrorHandler.cpp
99 ↗(On Diff #212508)

If you use R"(^undefined (?:internal |hidden |protected |)symbol: .*\n>>> referenced by (\S+):(\d+)\n.*)", this can be merged with undefined symbol above...

MaskRay added inline comments.Jul 31 2019, 12:12 AM
test/ELF/vs-diagnostics-undefined-hidden.s
2 ↗(On Diff #212508)

This is generic ELF (OS agnostic) so you can actually use -triple=x86_64..

3 ↗(On Diff #212508)

%tout -> /dev/null

ikudrin updated this revision to Diff 212537.Jul 31 2019, 2:10 AM
ikudrin added a project: lld.
  • Combined all the suggestions to improve the regular expression.
  • Addressed @MaskRay's comments for the test.
ruiu accepted this revision.Jul 31 2019, 6:21 PM

LGTM

This revision is now accepted and ready to land.Jul 31 2019, 6:21 PM
This revision was automatically updated to reflect the committed changes.