summaryrefslogtreecommitdiffstats
path: root/lld/lib/Core/LinkingContext.cpp
diff options
context:
space:
mode:
authorBrian Gesiak <modocache@gmail.com>2018-06-12 02:34:04 +0000
committerBrian Gesiak <modocache@gmail.com>2018-06-12 02:34:04 +0000
commitb9f7f4b87c574cfe477fa480394280e86b0e3c38 (patch)
tree90897cf1facaacc8b068ef481876cbcc43caf13b /lld/lib/Core/LinkingContext.cpp
parente6b2e06f289ba659cfad2be4cbd7b9acc4f5d641 (diff)
downloadbcm5719-llvm-b9f7f4b87c574cfe477fa480394280e86b0e3c38.tar.gz
bcm5719-llvm-b9f7f4b87c574cfe477fa480394280e86b0e3c38.zip
[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
Diffstat (limited to 'lld/lib/Core/LinkingContext.cpp')
-rw-r--r--lld/lib/Core/LinkingContext.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lld/lib/Core/LinkingContext.cpp b/lld/lib/Core/LinkingContext.cpp
index 5de863aa7f3..0f225c32212 100644
--- a/lld/lib/Core/LinkingContext.cpp
+++ b/lld/lib/Core/LinkingContext.cpp
@@ -20,8 +20,8 @@ LinkingContext::LinkingContext() = default;
LinkingContext::~LinkingContext() = default;
-bool LinkingContext::validate(raw_ostream &diagnostics) {
- return validateImpl(diagnostics);
+bool LinkingContext::validate() {
+ return validateImpl();
}
llvm::Error LinkingContext::writeFile(const File &linkedFile) const {
OpenPOWER on IntegriCloud