[PATCH] D47540: [lld] Enable Visual Studio compatible output

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 9 16:36:36 PDT 2018


ruiu added a comment.

In https://reviews.llvm.org/D47540#1154213, @chrisjackson wrote:

> I think that if we are to add support for Visual Studio (VS) that any
>  implementation should be explicit and not rely on quietly attempting to
>  transform any messages to the desired format. As you suggest, the pattern
>  matching / transform solution is quite hacky. Also, it will implicitly rely on
>  the diagnostic message string passed having the properties that the
>  implementation matches on. If we use a pattern matching implementation, have you
>  considered how we would handle message strings that do not conform to the
>  expected pattern?


I agree with you that what I suggested is hacky, but that's not immediately mean that's a bad approach. We could just pass through error messages that don't match the pattern. I'm not arguing that that's a better approach than extending the error message API, but I believe it's worth thinking.

It also feels to me that the API that takes both a source location and an error message might not nail it. Some error messages don't have the notion of the source location (e.g. command line argument) and some have multiple source locations (e.g. duplicate symbols). Adding a new API that covers only one case feels a bit odd to me.


https://reviews.llvm.org/D47540





More information about the llvm-commits mailing list