mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 04:30:12 +00:00
Show argv[0] in error messages (like gcc).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51755 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e43228958c
commit
ed3ba406c7
@ -87,8 +87,7 @@ int main(int argc, char** argv) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (InputFilenames.empty()) {
|
if (InputFilenames.empty()) {
|
||||||
std::cerr << "No input files.\n";
|
throw std::runtime_error("no input files");
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return BuildTargets(graph);
|
return BuildTargets(graph);
|
||||||
@ -97,10 +96,10 @@ int main(int argc, char** argv) {
|
|||||||
return ec.code();
|
return ec.code();
|
||||||
}
|
}
|
||||||
catch(const std::exception& ex) {
|
catch(const std::exception& ex) {
|
||||||
std::cerr << ex.what() << '\n';
|
std::cerr << argv[0] << ": " << ex.what() << '\n';
|
||||||
}
|
}
|
||||||
catch(...) {
|
catch(...) {
|
||||||
std::cerr << "Unknown error!\n";
|
std::cerr << argv[0] << ": unknown error!\n";
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user