[PATCH] D74085: [llvm-exegesis] Improve error reporting

Miloš Stojanović via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 5 13:12:35 PST 2020


mstojanovic created this revision.
mstojanovic added reviewers: courbet, gchatelet, petarj.
Herald added a subscriber: tschuett.
Herald added a project: LLVM.

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 occured during file access `<error_message>` will have of two parts: `'<file_name>': <rest_of_the_error_message>`


https://reviews.llvm.org/D74085

Files:
  llvm/tools/llvm-exegesis/llvm-exegesis.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74085.242728.patch
Type: text/x-patch
Size: 5890 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200205/327be860/attachment.bin>


More information about the llvm-commits mailing list