[llvm-commits] CVS: llvm/tools/gccld/Linker.cpp gccld.cpp

Brian Gaeke gaeke at cs.uiuc.edu
Tue Sep 30 09:04:01 PDT 2003


Changes in directory llvm/tools/gccld:

Linker.cpp updated: 1.4 -> 1.5
gccld.cpp updated: 1.52 -> 1.53

---
Log message:

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.)


---
Diffs of the changes:

Index: llvm/tools/gccld/Linker.cpp
diff -u llvm/tools/gccld/Linker.cpp:1.4 llvm/tools/gccld/Linker.cpp:1.5
--- llvm/tools/gccld/Linker.cpp:1.4	Mon Sep 29 22:24:28 2003
+++ llvm/tools/gccld/Linker.cpp	Tue Sep 30 09:03:48 2003
@@ -401,13 +401,13 @@
       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;
       }
     }


Index: llvm/tools/gccld/gccld.cpp
diff -u llvm/tools/gccld/gccld.cpp:1.52 llvm/tools/gccld/gccld.cpp:1.53
--- llvm/tools/gccld/gccld.cpp:1.52	Mon Sep 22 15:21:34 2003
+++ llvm/tools/gccld/gccld.cpp	Tue Sep 30 09:03:48 2003
@@ -256,7 +256,8 @@
                   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...





More information about the llvm-commits mailing list