Move some functions out of gccld.cpp to GenerateCode.cpp. This allows us
to reduce the inter-file interface in the gccld tool and gets some
uninteresting code out of gccld.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13942 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Linker/LinkArchives.cpp b/lib/Linker/LinkArchives.cpp
index 4f322d9..d7a74fb 100644
--- a/lib/Linker/LinkArchives.cpp
+++ b/lib/Linker/LinkArchives.cpp
@@ -332,8 +332,8 @@
std::cerr << "Trying to link archive '" << Pathname << "'\n";
if (LinkInArchive(HeadModule, Pathname, ErrorMessage, Verbose)) {
- PrintAndReturn(progname, ErrorMessage,
- ": Error linking in archive '" + Pathname + "'");
+ std::cerr << progname << ": Error linking in archive '" << Pathname
+ << "': " << ErrorMessage << "\n";
return true;
}
} else if (IsBytecode(Pathname)) {
@@ -341,8 +341,8 @@
std::cerr << "Trying to link bytecode file '" << Pathname << "'\n";
if (LinkInFile(HeadModule, Pathname, ErrorMessage, Verbose)) {
- PrintAndReturn(progname, ErrorMessage,
- ": Error linking in bytecode file '" + Pathname + "'");
+ std::cerr << progname << ": Error linking in bytecode file '"
+ << Pathname << "': " << ErrorMessage << "\n";
return true;
}
}