diff options
author | Chris Lattner <sabre@nondot.org> | 2002-07-30 19:52:14 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-07-30 19:52:14 +0000 |
commit | fa03cc7d68d5b17e42209477e78572836c295fa0 (patch) | |
tree | ec7863966caaf0e7ddc20fbde2269bee982bf6d4 /tools | |
parent | 48c1bc7b3a7a0ee9b30da43b83f63f210c65ee91 (diff) | |
download | external_llvm-fa03cc7d68d5b17e42209477e78572836c295fa0.zip external_llvm-fa03cc7d68d5b17e42209477e78572836c295fa0.tar.gz external_llvm-fa03cc7d68d5b17e42209477e78572836c295fa0.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@3166 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r-- | tools/dis/dis.cpp | 12 | ||||
-rw-r--r-- | tools/llvm-dis/dis.cpp | 12 | ||||
-rw-r--r-- | tools/llvm-dis/llvm-dis.cpp | 12 |
3 files changed, 18 insertions, 18 deletions
diff --git a/tools/dis/dis.cpp b/tools/dis/dis.cpp index 13c4da3..bc0c55b 100644 --- a/tools/dis/dis.cpp +++ b/tools/dis/dis.cpp @@ -50,15 +50,15 @@ int main(int argc, char **argv) { Module *M = ParseBytecodeFile(InputFilename); if (M == 0) { - cerr << "bytecode didn't read correctly.\n"; + cerr << argv[0] << ": bytecode didn't read correctly.\n"; return 1; } if (OutputFilename != "") { // Specified an output filename? if (!Force && std::ifstream(OutputFilename.c_str())) { // If force is not specified, make sure not to overwrite a file! - cerr << "Error opening '" << OutputFilename - << "': File exists! Sending to standard output.\n"; + cerr << argv[0] << ": error opening '" << OutputFilename + << "': file exists! Sending to standard output.\n"; } else { Out = new std::ofstream(OutputFilename.c_str()); } @@ -81,8 +81,8 @@ int main(int argc, char **argv) { if (!Force && std::ifstream(OutputFilename.c_str())) { // If force is not specified, make sure not to overwrite a file! - cerr << "Error opening '" << OutputFilename - << "': File exists! Sending to standard output.\n"; + cerr << argv[0] << ": error opening '" << OutputFilename + << "': file exists! Sending to standard output.\n"; } else { Out = new std::ofstream(OutputFilename.c_str()); @@ -94,7 +94,7 @@ int main(int argc, char **argv) { } if (!Out->good()) { - cerr << "Error opening " << OutputFilename + cerr << argv[0] << ": error opening " << OutputFilename << ": sending to stdout instead!\n"; Out = &std::cout; } diff --git a/tools/llvm-dis/dis.cpp b/tools/llvm-dis/dis.cpp index 13c4da3..bc0c55b 100644 --- a/tools/llvm-dis/dis.cpp +++ b/tools/llvm-dis/dis.cpp @@ -50,15 +50,15 @@ int main(int argc, char **argv) { Module *M = ParseBytecodeFile(InputFilename); if (M == 0) { - cerr << "bytecode didn't read correctly.\n"; + cerr << argv[0] << ": bytecode didn't read correctly.\n"; return 1; } if (OutputFilename != "") { // Specified an output filename? if (!Force && std::ifstream(OutputFilename.c_str())) { // If force is not specified, make sure not to overwrite a file! - cerr << "Error opening '" << OutputFilename - << "': File exists! Sending to standard output.\n"; + cerr << argv[0] << ": error opening '" << OutputFilename + << "': file exists! Sending to standard output.\n"; } else { Out = new std::ofstream(OutputFilename.c_str()); } @@ -81,8 +81,8 @@ int main(int argc, char **argv) { if (!Force && std::ifstream(OutputFilename.c_str())) { // If force is not specified, make sure not to overwrite a file! - cerr << "Error opening '" << OutputFilename - << "': File exists! Sending to standard output.\n"; + cerr << argv[0] << ": error opening '" << OutputFilename + << "': file exists! Sending to standard output.\n"; } else { Out = new std::ofstream(OutputFilename.c_str()); @@ -94,7 +94,7 @@ int main(int argc, char **argv) { } if (!Out->good()) { - cerr << "Error opening " << OutputFilename + cerr << argv[0] << ": error opening " << OutputFilename << ": sending to stdout instead!\n"; Out = &std::cout; } diff --git a/tools/llvm-dis/llvm-dis.cpp b/tools/llvm-dis/llvm-dis.cpp index 13c4da3..bc0c55b 100644 --- a/tools/llvm-dis/llvm-dis.cpp +++ b/tools/llvm-dis/llvm-dis.cpp @@ -50,15 +50,15 @@ int main(int argc, char **argv) { Module *M = ParseBytecodeFile(InputFilename); if (M == 0) { - cerr << "bytecode didn't read correctly.\n"; + cerr << argv[0] << ": bytecode didn't read correctly.\n"; return 1; } if (OutputFilename != "") { // Specified an output filename? if (!Force && std::ifstream(OutputFilename.c_str())) { // If force is not specified, make sure not to overwrite a file! - cerr << "Error opening '" << OutputFilename - << "': File exists! Sending to standard output.\n"; + cerr << argv[0] << ": error opening '" << OutputFilename + << "': file exists! Sending to standard output.\n"; } else { Out = new std::ofstream(OutputFilename.c_str()); } @@ -81,8 +81,8 @@ int main(int argc, char **argv) { if (!Force && std::ifstream(OutputFilename.c_str())) { // If force is not specified, make sure not to overwrite a file! - cerr << "Error opening '" << OutputFilename - << "': File exists! Sending to standard output.\n"; + cerr << argv[0] << ": error opening '" << OutputFilename + << "': file exists! Sending to standard output.\n"; } else { Out = new std::ofstream(OutputFilename.c_str()); @@ -94,7 +94,7 @@ int main(int argc, char **argv) { } if (!Out->good()) { - cerr << "Error opening " << OutputFilename + cerr << argv[0] << ": error opening " << OutputFilename << ": sending to stdout instead!\n"; Out = &std::cout; } |