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

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 5 10:44:51 PDT 2018


ruiu added a comment.

This still seems a bit too complicated to me. I wonder if we can simplify this by textually tweak error messages inside error() (and other functions such as fatal()), so that error messages are converted to MSVC-ish format, without changing any API.

Since MSVC doesn't recognize multi-line error messages, only the first line of an error message matters. Currently, the first line of an error message is in the following format:

  error: filename[:line#]: any text

So it seems easy to recognize this pattern to replace it with:

  filename [line#]: error: any text

This might seem a bit hacky, but this is less intrusive than adding a new parameter to all the error-handling functions. What do you think?


https://reviews.llvm.org/D47540





More information about the llvm-commits mailing list