[PATCH] D45467: [wip] COFF: Friendlier undefined symbol errors.

Zachary Turner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 9 17:12:57 PDT 2018


zturner added a comment.

In https://reviews.llvm.org/D45467#1062509, @pcc wrote:

> The error messages look a little odd on non-Windows platforms:
>
>    ra/bin/lld-link: error: undefined symbol: ?foo@@YAHXZ
>   >>> referenced by \path\to\foo.cpp:4
>   >>>               foo.obj:(main)
>   
>
> (i.e. backslashes rather than slashes in the file path)
>
> @zturner Would there be any downside to using slashes in our codeview output on non-Windows?


We should probably use the native host slash for all paths.  Reason being that MS tools need to be able to link our object files, and we don't have any control over how they handle slashes.  Windows' tools handling of forward slashes in tools is pretty inconsistent, but in most cases doesn't work very well, so I would expect things to break if we have slashes (e.g. even if the linker doesn't break and dutifully copies a path with forward slashes into a PDB, the debugger could break).


https://reviews.llvm.org/D45467





More information about the llvm-commits mailing list