aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Gaeke <gaeke@uiuc.edu>2003-09-30 14:03:48 +0000
committerBrian Gaeke <gaeke@uiuc.edu>2003-09-30 14:03:48 +0000
commite98ddfce7edbcdcce0e60d4162da1306228c3f4a (patch)
tree3fee2ec09d83d262836990c54d94c24e07a3b512
parentf5b55656c00cf2e75d265b7147cf60edd6e2eb10 (diff)
downloadexternal_llvm-e98ddfce7edbcdcce0e60d4162da1306228c3f4a.zip
external_llvm-e98ddfce7edbcdcce0e60d4162da1306228c3f4a.tar.gz
external_llvm-e98ddfce7edbcdcce0e60d4162da1306228c3f4a.tar.bz2
1. Use better error messages in LinkFiles().
2. I think the caller of LinkFiles() should not ignore a true return value. (If you have a good reason why it ought to, feel free to revert this. It's just something that's been bugging me for a while.) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8760 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Linker/LinkArchives.cpp4
-rw-r--r--tools/gccld/Linker.cpp4
-rw-r--r--tools/gccld/gccld.cpp3
3 files changed, 6 insertions, 5 deletions
diff --git a/lib/Linker/LinkArchives.cpp b/lib/Linker/LinkArchives.cpp
index 0d0dc9f..34fe2f1 100644
--- a/lib/Linker/LinkArchives.cpp
+++ b/lib/Linker/LinkArchives.cpp
@@ -401,13 +401,13 @@ bool LinkFiles(const char *progname,
Pathname = Files[i];
} else {
if (SearchPath == NULL) {
- std::cerr << "Cannot find " << Files[i];
+ std::cerr << "Cannot find linker input file '" << Files[i] << "'";
return true;
}
Pathname = std::string(SearchPath)+"/"+Files[i];
if (!FileExists(Pathname)) {
- std::cerr << "Cannot find " << Files[i];
+ std::cerr << "Cannot find linker input file '" << Files[i] << "'";
return true;
}
}
diff --git a/tools/gccld/Linker.cpp b/tools/gccld/Linker.cpp
index 0d0dc9f..34fe2f1 100644
--- a/tools/gccld/Linker.cpp
+++ b/tools/gccld/Linker.cpp
@@ -401,13 +401,13 @@ bool LinkFiles(const char *progname,
Pathname = Files[i];
} else {
if (SearchPath == NULL) {
- std::cerr << "Cannot find " << Files[i];
+ std::cerr << "Cannot find linker input file '" << Files[i] << "'";
return true;
}
Pathname = std::string(SearchPath)+"/"+Files[i];
if (!FileExists(Pathname)) {
- std::cerr << "Cannot find " << Files[i];
+ std::cerr << "Cannot find linker input file '" << Files[i] << "'";
return true;
}
}
diff --git a/tools/gccld/gccld.cpp b/tools/gccld/gccld.cpp
index 8b9dfd1..b991cd5 100644
--- a/tools/gccld/gccld.cpp
+++ b/tools/gccld/gccld.cpp
@@ -256,7 +256,8 @@ main(int argc, char **argv, char ** envp)
Libraries.end());
// Link in all of the files
- LinkFiles(argv[0], Composite.get(), InputFilenames, Verbose);
+ if (LinkFiles(argv[0], Composite.get(), InputFilenames, Verbose))
+ return 1; // Error already printed
LinkLibraries(argv[0], Composite.get(), Libraries, LibPaths, Verbose, Native);
// Link in all of the libraries next...