aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Driver
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2019-08-20 20:51:32 +0000
committerDimitry Andric <dim@FreeBSD.org>2019-08-20 20:51:32 +0000
commitf1e1c239e31b467e17f1648b1f524fc9ab5b431a (patch)
treea855e7a2a8808555da60e6aa9601d6867eb23bac /lib/Driver
parent7d6988fdd2aee0e033034e147f16fe05594a60e4 (diff)
downloadsrc-f1e1c239e31b467e17f1648b1f524fc9ab5b431a.tar.gz
src-f1e1c239e31b467e17f1648b1f524fc9ab5b431a.zip
Vendor import of stripped lld trunk r366426 (just before the release_90vendor/lld/lld-trunk-r366426
Notes
Notes: svn path=/vendor/lld/dist/; revision=351288 svn path=/vendor/lld/lld-trunk-r366426/; revision=351289; tag=vendor/lld/lld-trunk-r366426
Diffstat (limited to 'lib/Driver')
-rw-r--r--lib/Driver/DarwinLdDriver.cpp31
1 files changed, 15 insertions, 16 deletions
diff --git a/lib/Driver/DarwinLdDriver.cpp b/lib/Driver/DarwinLdDriver.cpp
index bbac230df453..8646d86c08e4 100644
--- a/lib/Driver/DarwinLdDriver.cpp
+++ b/lib/Driver/DarwinLdDriver.cpp
@@ -1,9 +1,8 @@
//===- lib/Driver/DarwinLdDriver.cpp --------------------------------------===//
//
-// The LLVM Linker
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
///
@@ -334,8 +333,8 @@ bool parse(llvm::ArrayRef<const char *> args, MachOLinkingContext &ctx) {
Twine(unknownArg->getAsString(parsedArgs)));
}
- errorHandler().Verbose = parsedArgs.hasArg(OPT_v);
- errorHandler().ErrorLimit = args::getInteger(parsedArgs, OPT_error_limit, 20);
+ errorHandler().verbose = parsedArgs.hasArg(OPT_v);
+ errorHandler().errorLimit = args::getInteger(parsedArgs, OPT_error_limit, 20);
// Figure out output kind ( -dylib, -r, -bundle, -preload, or -static )
llvm::MachO::HeaderFileType fileType = llvm::MachO::MH_EXECUTE;
@@ -638,7 +637,7 @@ bool parse(llvm::ArrayRef<const char *> args, MachOLinkingContext &ctx) {
// Now that we've constructed the final set of search paths, print out those
// search paths in verbose mode.
- if (errorHandler().Verbose) {
+ if (errorHandler().verbose) {
message("Library search paths:");
for (auto path : ctx.searchDirs()) {
message(" " + path);
@@ -1146,13 +1145,13 @@ static void createFiles(MachOLinkingContext &ctx, bool Implicit) {
/// This is where the link is actually performed.
bool link(llvm::ArrayRef<const char *> args, bool CanExitEarly,
raw_ostream &Error) {
- errorHandler().LogName = args::getFilenameWithoutExe(args[0]);
- errorHandler().ErrorLimitExceededMsg =
+ errorHandler().logName = args::getFilenameWithoutExe(args[0]);
+ errorHandler().errorLimitExceededMsg =
"too many errors emitted, stopping now (use "
"'-error-limit 0' to see all errors)";
- errorHandler().ErrorOS = &Error;
- errorHandler().ExitEarly = CanExitEarly;
- errorHandler().ColorDiagnostics = Error.has_colors();
+ errorHandler().errorOS = &Error;
+ errorHandler().exitEarly = CanExitEarly;
+ errorHandler().colorDiagnostics = Error.has_colors();
MachOLinkingContext ctx;
if (!parse(args, ctx))
@@ -1197,9 +1196,9 @@ bool link(llvm::ArrayRef<const char *> args, bool CanExitEarly,
if (auto ec = pm.runOnFile(*merged)) {
// FIXME: This should be passed to logAllUnhandledErrors but it needs
// to be passed a Twine instead of a string.
- *errorHandler().ErrorOS << "Failed to run passes on file '"
+ *errorHandler().errorOS << "Failed to run passes on file '"
<< ctx.outputPath() << "': ";
- logAllUnhandledErrors(std::move(ec), *errorHandler().ErrorOS,
+ logAllUnhandledErrors(std::move(ec), *errorHandler().errorOS,
std::string());
return false;
}
@@ -1211,9 +1210,9 @@ bool link(llvm::ArrayRef<const char *> args, bool CanExitEarly,
if (auto ec = ctx.writeFile(*merged)) {
// FIXME: This should be passed to logAllUnhandledErrors but it needs
// to be passed a Twine instead of a string.
- *errorHandler().ErrorOS << "Failed to write file '" << ctx.outputPath()
+ *errorHandler().errorOS << "Failed to write file '" << ctx.outputPath()
<< "': ";
- logAllUnhandledErrors(std::move(ec), *errorHandler().ErrorOS,
+ logAllUnhandledErrors(std::move(ec), *errorHandler().errorOS,
std::string());
return false;
}