When we find a module we want, in an archive, in verbose mode,
authorBrian Gaeke <gaeke@uiuc.edu>
Sun, 16 Nov 2003 23:07:13 +0000 (23:07 +0000)
committerBrian Gaeke <gaeke@uiuc.edu>
Sun, 16 Nov 2003 23:07:13 +0000 (23:07 +0000)
 print out the module's identifier (which should now contain the name
 of both the archive and the module.)
Wrap some lines at 80 cols.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10039 91177308-0d34-0410-b5e6-96231b3b80d8

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

index 9c228917754b0a9ec8dd8175f7551a83d5aaae6d..701458bb43ed054b031b2ea65b3d521bd3689222 100644 (file)
@@ -205,7 +205,9 @@ static bool LinkInArchive(Module *M,
              E = UndefinedSymbols.end(); I != E; ++I)
         if (DefSymbols.count(*I)) {
           if (Verbose)
-            std::cerr << "  Found object providing symbol '" << *I << "'...\n";
+            std::cerr << "  Found object '"
+                      << Objects[i]->getModuleIdentifier ()
+                      << "' providing symbol '" << *I << "'...\n";
           ObjectRequired = true;
           break;
         }
@@ -377,7 +379,8 @@ bool LinkLibraries(const char *progname,
       // we're doing a native link and give an error if we're doing a bytecode
       // link.
       if (!Native) {
-        PrintAndReturn(progname, "Cannot find library -l" + Libraries[i] + "\n");
+        PrintAndReturn(progname, "Cannot find library -l" + Libraries[i]
+                       + "\n");
         return true;
       }
     }
@@ -386,20 +389,24 @@ bool LinkLibraries(const char *progname,
     // is not installed as a library. Detect that and link the library.
     if (IsArchive(Pathname)) {
       if (Verbose)
-        std::cerr << "Trying to link archive '" << Pathname << "' (-l" << Libraries[i] << ")\n";
+        std::cerr << "Trying to link archive '" << Pathname << "' (-l"
+                  << Libraries[i] << ")\n";
 
       if (LinkInArchive(HeadModule, Pathname, ErrorMessage, Verbose)) {
         PrintAndReturn(progname, ErrorMessage,
-                       ": Error linking in archive '" + Pathname + "' (-l" + Libraries[i] + ")");
+                       ": Error linking in archive '" + Pathname
+                       + "' (-l" + Libraries[i] + ")");
         return true;
       }
     } else if (IsBytecode(Pathname)) {
       if (Verbose)
-        std::cerr << "Trying to link bytecode file '" << Pathname << "' (-l" << Libraries[i] << ")\n";
+        std::cerr << "Trying to link bytecode file '" << Pathname
+                  << "' (-l" << Libraries[i] << ")\n";
 
       if (LinkInFile(HeadModule, Pathname, ErrorMessage, Verbose)) {
         PrintAndReturn(progname, ErrorMessage,
-                       ": error linking in bytecode file '" + Pathname + "' (-l" + Libraries[i] + ")");
+                       ": error linking in bytecode file '" + Pathname
+                       + "' (-l" + Libraries[i] + ")");
         return true;
       }
     }
index 9c228917754b0a9ec8dd8175f7551a83d5aaae6d..701458bb43ed054b031b2ea65b3d521bd3689222 100644 (file)
@@ -205,7 +205,9 @@ static bool LinkInArchive(Module *M,
              E = UndefinedSymbols.end(); I != E; ++I)
         if (DefSymbols.count(*I)) {
           if (Verbose)
-            std::cerr << "  Found object providing symbol '" << *I << "'...\n";
+            std::cerr << "  Found object '"
+                      << Objects[i]->getModuleIdentifier ()
+                      << "' providing symbol '" << *I << "'...\n";
           ObjectRequired = true;
           break;
         }
@@ -377,7 +379,8 @@ bool LinkLibraries(const char *progname,
       // we're doing a native link and give an error if we're doing a bytecode
       // link.
       if (!Native) {
-        PrintAndReturn(progname, "Cannot find library -l" + Libraries[i] + "\n");
+        PrintAndReturn(progname, "Cannot find library -l" + Libraries[i]
+                       + "\n");
         return true;
       }
     }
@@ -386,20 +389,24 @@ bool LinkLibraries(const char *progname,
     // is not installed as a library. Detect that and link the library.
     if (IsArchive(Pathname)) {
       if (Verbose)
-        std::cerr << "Trying to link archive '" << Pathname << "' (-l" << Libraries[i] << ")\n";
+        std::cerr << "Trying to link archive '" << Pathname << "' (-l"
+                  << Libraries[i] << ")\n";
 
       if (LinkInArchive(HeadModule, Pathname, ErrorMessage, Verbose)) {
         PrintAndReturn(progname, ErrorMessage,
-                       ": Error linking in archive '" + Pathname + "' (-l" + Libraries[i] + ")");
+                       ": Error linking in archive '" + Pathname
+                       + "' (-l" + Libraries[i] + ")");
         return true;
       }
     } else if (IsBytecode(Pathname)) {
       if (Verbose)
-        std::cerr << "Trying to link bytecode file '" << Pathname << "' (-l" << Libraries[i] << ")\n";
+        std::cerr << "Trying to link bytecode file '" << Pathname
+                  << "' (-l" << Libraries[i] << ")\n";
 
       if (LinkInFile(HeadModule, Pathname, ErrorMessage, Verbose)) {
         PrintAndReturn(progname, ErrorMessage,
-                       ": error linking in bytecode file '" + Pathname + "' (-l" + Libraries[i] + ")");
+                       ": error linking in bytecode file '" + Pathname
+                       + "' (-l" + Libraries[i] + ")");
         return true;
       }
     }