[llvm-branch-commits] [lld] f710bb7 - lld: Replace some lld::outs()s with message()
Nico Weber via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Dec 17 13:23:51 PST 2020
Author: Nico Weber
Date: 2020-12-17T16:19:09-05:00
New Revision: f710bb7063b232be1cffc7a0f0f56606d7bff2ad
URL: https://github.com/llvm/llvm-project/commit/f710bb7063b232be1cffc7a0f0f56606d7bff2ad
DIFF: https://github.com/llvm/llvm-project/commit/f710bb7063b232be1cffc7a0f0f56606d7bff2ad.diff
LOG: lld: Replace some lld::outs()s with message()
No behavior change.
Added:
Modified:
lld/COFF/Driver.cpp
lld/MachO/Driver.cpp
lld/MachO/DriverUtils.cpp
Removed:
################################################################################
diff --git a/lld/COFF/Driver.cpp b/lld/COFF/Driver.cpp
index 504c00584d9c..08862b062f91 100644
--- a/lld/COFF/Driver.cpp
+++ b/lld/COFF/Driver.cpp
@@ -1263,7 +1263,7 @@ void LinkerDriver::link(ArrayRef<const char *> argsArr) {
// because it doesn't start with "/", but we deliberately chose "--" to
// avoid conflict with /version and for compatibility with clang-cl.
if (args.hasArg(OPT_dash_dash_version)) {
- lld::outs() << getLLDVersion() << "\n";
+ message(getLLDVersion());
return;
}
diff --git a/lld/MachO/Driver.cpp b/lld/MachO/Driver.cpp
index db89dd60a20b..4f9c111bd8fb 100644
--- a/lld/MachO/Driver.cpp
+++ b/lld/MachO/Driver.cpp
@@ -325,7 +325,7 @@ static InputFile *addFile(StringRef path, bool forceLoadArchive) {
// printArchiveMemberLoad() prints both .a and .o names, so no need to
// print the .a name here.
if (config->printEachFile && magic != file_magic::archive)
- lld::outs() << toString(newFile) << '\n';
+ message(toString(newFile));
inputFiles.insert(newFile);
}
return newFile;
diff --git a/lld/MachO/DriverUtils.cpp b/lld/MachO/DriverUtils.cpp
index 5040f634e181..563ae266735d 100644
--- a/lld/MachO/DriverUtils.cpp
+++ b/lld/MachO/DriverUtils.cpp
@@ -208,7 +208,7 @@ uint32_t macho::getModTime(StringRef path) {
void macho::printArchiveMemberLoad(StringRef reason, const InputFile *f) {
if (config->printEachFile)
- lld::outs() << toString(f) << '\n';
+ message(toString(f));
if (config->printWhyLoad)
- lld::outs() << reason << " forced load of " << toString(f) << '\n';
+ message(reason + " forced load of " + toString(f));
}
More information about the llvm-branch-commits
mailing list