aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Gaeke <gaeke@uiuc.edu>2003-10-21 21:07:12 +0000
committerBrian Gaeke <gaeke@uiuc.edu>2003-10-21 21:07:12 +0000
commitf1fce0881f90e8ec6a47703cbc90db5feebaef7a (patch)
treec990c2fa31edf11e245ae134fd4868ada7a00d8d
parent2b89a6a931b0b0d9c3cdc82e7512173c8814b45d (diff)
downloadexternal_llvm-f1fce0881f90e8ec6a47703cbc90db5feebaef7a.zip
external_llvm-f1fce0881f90e8ec6a47703cbc90db5feebaef7a.tar.gz
external_llvm-f1fce0881f90e8ec6a47703cbc90db5feebaef7a.tar.bz2
Fix off-by-one error in processing of libraries named on command line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9351 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Linker/LinkArchives.cpp2
-rw-r--r--tools/gccld/Linker.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/Linker/LinkArchives.cpp b/lib/Linker/LinkArchives.cpp
index 881581f..d9c029a 100644
--- a/lib/Linker/LinkArchives.cpp
+++ b/lib/Linker/LinkArchives.cpp
@@ -427,7 +427,7 @@ bool LinkLibraries(const char *progname,
// String in which to receive error messages.
std::string ErrorMessage;
- for (unsigned i = 1; i < Libraries.size(); ++i) {
+ for (unsigned i = 0; i < Libraries.size(); ++i) {
// Determine where this library lives.
std::string Pathname = FindLib(Libraries[i], LibPaths);
if (Pathname.empty()) {
diff --git a/tools/gccld/Linker.cpp b/tools/gccld/Linker.cpp
index 881581f..d9c029a 100644
--- a/tools/gccld/Linker.cpp
+++ b/tools/gccld/Linker.cpp
@@ -427,7 +427,7 @@ bool LinkLibraries(const char *progname,
// String in which to receive error messages.
std::string ErrorMessage;
- for (unsigned i = 1; i < Libraries.size(); ++i) {
+ for (unsigned i = 0; i < Libraries.size(); ++i) {
// Determine where this library lives.
std::string Pathname = FindLib(Libraries[i], LibPaths);
if (Pathname.empty()) {