[llvm-exegesis] Improve error reporting
Fix inconsistencies in error reporting created by mixing `report_fatal_error()` and `ExitOnErr()`, and add additional information to the error message to make it more user friendly. Minimize the use `report_fatal_error()` because it's meant for use in very rare cases and it results in low information density of the error messages. Summary of the new design: * For command line argument errors output `llvm-exegesis: <error_message>`, which is consistent with the error output format emitted by the backend which checks correctness of the command line arguments. * For other errors the format `llvm-exegesis error: <error_message>` is used. ** If the error occurred during file access `<error_message>` will have of two parts: `'<file_name>': <rest_of_the_error_message>` Differential Revision: https://reviews.llvm.org/D74085
Loading