Fix off-by-one error in processing of libraries named on command line.
authorBrian Gaeke <gaeke@uiuc.edu>
Tue, 21 Oct 2003 21:07:12 +0000 (21:07 +0000)
committerBrian Gaeke <gaeke@uiuc.edu>
Tue, 21 Oct 2003 21:07:12 +0000 (21:07 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9351 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Linker/LinkArchives.cpp
tools/gccld/Linker.cpp

index 881581fcadc5bfdf54df63b1a041af9dd69059e4..d9c029aec9d8d9f5547997361506528c91f660cc 100644 (file)
@@ -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()) {
index 881581fcadc5bfdf54df63b1a041af9dd69059e4..d9c029aec9d8d9f5547997361506528c91f660cc 100644 (file)
@@ -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()) {