diff options
author | Chris Lattner <sabre@nondot.org> | 2002-07-30 21:43:22 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-07-30 21:43:22 +0000 |
commit | 50e3a20b54be93fce84f70075730b8d38c0318d7 (patch) | |
tree | 0da71d6761967740f398709bc271261a291245a5 /tools/gccld | |
parent | fa03cc7d68d5b17e42209477e78572836c295fa0 (diff) | |
download | external_llvm-50e3a20b54be93fce84f70075730b8d38c0318d7.zip external_llvm-50e3a20b54be93fce84f70075730b8d38c0318d7.tar.gz external_llvm-50e3a20b54be93fce84f70075730b8d38c0318d7.tar.bz2 |
Print the tool name when an error comes from so that I can tell which
tool of a pipeline is having issues.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3167 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/gccld')
-rw-r--r-- | tools/gccld/gccld.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/gccld/gccld.cpp b/tools/gccld/gccld.cpp index 5649796..5113105 100644 --- a/tools/gccld/gccld.cpp +++ b/tools/gccld/gccld.cpp @@ -123,7 +123,7 @@ int main(int argc, char **argv) { if (Verbose) cerr << "Linking in '" << InputFilenames[i] << "'\n"; if (LinkModules(Composite.get(), M.get(), &ErrorMessage)) { - cerr << "Error linking in '" << InputFilenames[i] << "': " + cerr << argv[0] << ": error linking in '" << InputFilenames[i] << "': " << ErrorMessage << "\n"; return 1; } @@ -165,7 +165,8 @@ int main(int argc, char **argv) { // Add the pass that writes bytecode to the output file... std::ofstream Out((OutputFilename+".bc").c_str()); if (!Out.good()) { - cerr << "Error opening '" << OutputFilename << ".bc' for writing!\n"; + cerr << argv[0] << ": error opening '" << OutputFilename + << ".bc' for writing!\n"; return 1; } Passes.add(new WriteBytecodePass(&Out)); // Write bytecode to file... @@ -180,7 +181,8 @@ int main(int argc, char **argv) { // Output the script to start the program... std::ofstream Out2(OutputFilename.c_str()); if (!Out2.good()) { - cerr << "Error opening '" << OutputFilename << "' for writing!\n"; + cerr << argv[0] << ": error opening '" << OutputFilename + << "' for writing!\n"; return 1; } Out2 << "#!/bin/sh\nlli -q $0.bc $*\n"; |