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@3168 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2002-07-30 21:43:25 +00:00
parent 50e3a20b54
commit d4c7f2766b
7 changed files with 38 additions and 29 deletions

View File

@@ -102,12 +102,12 @@ int main(int argc, char **argv) {
// Parse the file now...
M.reset(ParseAssemblyFile(InputFilename));
} catch (const ParseException &E) {
cerr << E.getMessage() << "\n";
cerr << argv[0] << ": " << E.getMessage() << "\n";
return 1;
}
if (M.get() == 0) {
cerr << "assembly didn't read correctly.\n";
cerr << argv[0] << ": assembly didn't read correctly.\n";
return 1;
}
@@ -124,7 +124,7 @@ int main(int argc, char **argv) {
std::ofstream Out(OutputFilename.c_str(), std::ios::out);
if (!Out.good()) {
cerr << "Error opening " << OutputFilename << "!\n";
cerr << argv[0] << ": error opening " << OutputFilename << "!\n";
return 1;
}