[PATCH] D65213: [ELF] With --vs-diagnostics, print a separate message for each location of a duplicate symbol.

Igor Kudrin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 24 21:38:40 PDT 2019


ikudrin added a comment.

In D65213#1599884 <https://reviews.llvm.org/D65213#1599884>, @ruiu wrote:

> I don't think we should change the original error message, as the original message seems to make more sense than the new one for users.


The original error message, when `--vs-diagnostics` is not used, is mostly the same. There is only a small improvement for a case when only one section, either for an old or new definition, is present.

On the other hand, one of the reasons for `--vs-diagnostics` is to provide a user with means to jump to the mentioned location. That is achieved by placing the location in front of the error message. Thus, as there are usually two source locations, there should be two separate error messages.

> Have you considered changing the regexp to parse this error message?

I am afraid I might not fully understand your idea. Are you suggesting to detect this particular error message using regexps, divide it into pieces and then reconstruct two separate messages placing source locations at their beginnings?


Repository:
  rLLD LLVM Linker

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65213/new/

https://reviews.llvm.org/D65213





More information about the llvm-commits mailing list