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

Chris Jackson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 6 04:10:13 PDT 2018


chrisjackson added a comment.

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?

Clang's Visual Studio format support is not identical to my suggestion but
the output string is constructed for the format and does not rely on a transform
e.g. llvm\tools\clang\lib\Frontend\TextDiagnostic.cpp.

Additionally, I believe that intrusion of extending the api as I've suggested is
outweighed by the structure it will bring to diagnostic messages. Currently any
string can be passed to error/warn/fail and it might be nice to suggest some
kind of consistency by separating the source and message.


https://reviews.llvm.org/D47540





More information about the llvm-commits mailing list