summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/llvm-link/llvm-link.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/tools/llvm-link/llvm-link.cpp b/tools/llvm-link/llvm-link.cpp
index 150ab0d..6e40491 100644
--- a/tools/llvm-link/llvm-link.cpp
+++ b/tools/llvm-link/llvm-link.cpp
@@ -80,11 +80,19 @@ int main(int argc, char **argv) {
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";