newline() in ErrorHandler.cpp already tries to insert newlines between messages that contain embedded newlines, so getSymbolLocations() shouldn't return a string that ends in a newline -- else we end up with two newlines between error messages.
Makes lld-link's output look more like ld.lld output.
Before:
lld-link: error: undefined symbol: _f >>> referenced by /Users/thakis/src/llvm-mono/test.c:4 >>> test.obj:(_main) lld-link: error: undefined symbol: _g >>> referenced by /Users/thakis/src/llvm-mono/test.c:4 >>> test.obj:(_main) lld-link: error: undefined symbol: _h >>> referenced by /Users/thakis/src/llvm-mono/test.c:4 >>> test.obj:(_main)
After:
lld-link: error: undefined symbol: _f >>> referenced by /Users/thakis/src/llvm-mono/test.c:4 >>> test.obj:(_main) lld-link: error: undefined symbol: _g >>> referenced by /Users/thakis/src/llvm-mono/test.c:4 >>> test.obj:(_main) lld-link: error: undefined symbol: _h >>> referenced by /Users/thakis/src/llvm-mono/test.c:4 >>> test.obj:(_main)