[llvm-commits] CVS: llvm/tools/llvm-link/llvm-link.cpp
Chris Lattner
lattner at cs.uiuc.edu
Mon Sep 27 09:41:15 PDT 2004
Changes in directory llvm/tools/llvm-link:
llvm-link.cpp updated: 1.44 -> 1.45
---
Log message:
Hrm, if there is an error loading a file, try printing a message so the
user knows that...
---
Diffs of the changes: (+10 -2)
Index: llvm/tools/llvm-link/llvm-link.cpp
diff -u llvm/tools/llvm-link/llvm-link.cpp:1.44 llvm/tools/llvm-link/llvm-link.cpp:1.45
--- llvm/tools/llvm-link/llvm-link.cpp:1.44 Sun Sep 12 18:39:42 2004
+++ llvm/tools/llvm-link/llvm-link.cpp Mon Sep 27 11:41:01 2004
@@ -80,11 +80,19 @@
std::string ErrorMessage;
std::auto_ptr<Module> Composite(LoadFile(InputFilenames[BaseArg]));
- if (Composite.get() == 0) return 1;
+ if (Composite.get() == 0) {
+ std::cerr << argv[0] << ": error loading file '"
+ << InputFilenames[BaseArg] << "'\n";
+ return 1;
+ }
for (unsigned i = BaseArg+1; i < InputFilenames.size(); ++i) {
std::auto_ptr<Module> M(LoadFile(InputFilenames[i]));
- if (M.get() == 0) return 1;
+ if (M.get() == 0) {
+ std::cerr << argv[0] << ": error loading file '"
+ << InputFilenames[i] << "'\n";
+ return 1;
+ }
if (Verbose) std::cerr << "Linking in '" << InputFilenames[i] << "'\n";
More information about the llvm-commits
mailing list