This is a companion change to D44382. That change changes the debug line parser interface to report LLVM errors, and to improve the error/warning reporting mechanism to not use fprintf(stderr, ...).
As noted in the description on D44382, these warnings were not using the errs() stream, and so were not always being flushed properly by LLD on shutdown. To test this, I have extended the bad-debug undefined symbol message case to show that a corresponding warning is printed, if the debug line cannot be parsed.
I agree with David; LTOrError is a confusing variable name.
Can you avoid using auto here?