diff options
author | Chris Lattner <sabre@nondot.org> | 2004-09-27 16:41:01 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-09-27 16:41:01 +0000 |
commit | 48f44cf5b3717df78933f968424213f39f807997 (patch) | |
tree | 920b97b284c5a7541e70898fab2a8d7fa85abbff /tools/llvm-link | |
parent | 907c7c7dd149d59d82631ff68687f4f6ea51bb00 (diff) | |
download | external_llvm-48f44cf5b3717df78933f968424213f39f807997.zip external_llvm-48f44cf5b3717df78933f968424213f39f807997.tar.gz external_llvm-48f44cf5b3717df78933f968424213f39f807997.tar.bz2 |
Hrm, if there is an error loading a file, try printing a message so the
user knows that...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16524 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-link')
-rw-r--r-- | tools/llvm-link/llvm-link.cpp | 12 |
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"; |