hanchenye-llvm-project/lld/lib/Core
Brian Gesiak b9f7f4b87c [Darwin] Use errorHandler from liblldCommon
Summary:
Error handling in liblldCore and the Darwin toolchain prints to an
output stream. A TODO in the project explained that a diagnostics
interface resembling Clang's should be added.

For now, the simple diagnostics interface defined in liblldCommon seems
like an improvement. It prints colors when they're available, uses locks
for thread-safety, and abstracts away the `"error: "` and newline
literal strings that litter the Darwin toolchain code.

To use the liblldCommon error handler, a link dependency is added to
the liblldDriver library.

Test Plan:
1. check-lld
2. Invoke `ld64.lld -r` in a terminal that supports color output.
   Confirm that "ld64.lld: error: -arch not specified and could not be inferred"
   is output, and that the "error:" is colored red!

Reviewers: ruiu, smeenai

Reviewed By: ruiu

Subscribers: mgorny, llvm-commits

Differential Revision: https://reviews.llvm.org/D47998

llvm-svn: 334466
2018-06-12 02:34:04 +00:00
..
CMakeLists.txt Move new lld's code to Common subdirectory. 2017-10-02 21:00:41 +00:00
DefinedAtom.cpp
Error.cpp
File.cpp
LinkingContext.cpp [Darwin] Use errorHandler from liblldCommon 2018-06-12 02:34:04 +00:00
Reader.cpp Move Object format code to lib/BinaryFormat. 2017-06-07 03:48:56 +00:00
Resolver.cpp Move new lld's code to Common subdirectory. 2017-10-02 21:00:41 +00:00
SymbolTable.cpp Move new lld's code to Common subdirectory. 2017-10-02 21:00:41 +00:00
Writer.cpp