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

Chris Jackson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 25 07:44:41 PDT 2019


chrisjackson added a comment.

In D65213#1600461 <https://reviews.llvm.org/D65213#1600461>, @ikudrin wrote:

> 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?

I don't know if what you have suggested is what @ruiu intended, But I think that your interpretation makes a lot of sense. That way most of the vs-diagnostics related implementation can remain in ErrorHandler.


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