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/llc/llc.cpp | |
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/llc/llc.cpp')
-rw-r--r-- | tools/llc/llc.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/llc/llc.cpp b/tools/llc/llc.cpp index f5ba08c..88f327d 100644 --- a/tools/llc/llc.cpp +++ b/tools/llc/llc.cpp @@ -153,7 +153,7 @@ int main(int argc, char **argv) { // Load the module to be compiled... std::auto_ptr<Module> M(ParseBytecodeFile(InputFilename)); if (M.get() == 0) { - cerr << "bytecode didn't read correctly.\n"; + cerr << argv[0] << ": bytecode didn't read correctly.\n"; return 1; } @@ -183,7 +183,8 @@ int main(int argc, char **argv) { 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!\n" + cerr << argv[0] << ": error opening '" << OutputFilename + << "': file exists!\n" << "Use -f command line argument to force output\n"; return 1; } @@ -202,14 +203,15 @@ 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!\n" + cerr << argv[0] << ": error opening '" << OutputFilename + << "': file exists!\n" << "Use -f command line argument to force output\n"; return 1; } Out = new std::ofstream(OutputFilename.c_str()); if (!Out->good()) { - cerr << "Error opening " << OutputFilename << "!\n"; + cerr << argv[0] << ": error opening " << OutputFilename << "!\n"; delete Out; return 1; } |