Recommit: "[llvm-exegesis] Improve error reporting"
Summary: Commit b3576f60 was reverted in abe01e17 because it broke builds testing without libpfm. A preparatory commit <commit_sha1> was added to enable this recommit. Original commit message: 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
Please register or sign in to comment