This is an archive of the discontinued LLVM Phabricator instance.

[DebugInfo] Common behavior for error types
ClosedPublic

Authored by aganea on Aug 30 2018, 11:38 AM.

Details

Summary

Following D50807, and heading towards D50664, this intermediary change does the following:

  1. Upgrade all custom Error types in llvm/trunk/lib/DebugInfo/ to use the new StringError behavior (D50807).
  2. Implement std::is_error_code_enum and make_error_code() for DebugInfo error enumerations.
  3. Renamed GenericError -> PDBError (the file will be renamed in a subsequent commit)
  4. Updated custom error messages to follow the same formatting: (\w\s*)+\.
  5. Generic "file not found" (ENOENT) errors are now kept as they are in PDB code. Previously, there used to be a custom enumeration for that purpose.
  6. Removed a few extraneous LF in log() implementations. Printing LF is a responsability at a higher level, not at the error level.

Please let me know if you wish to split this change any further.

Diff Detail

Repository
rL LLVM

Event Timeline

aganea created this revision.Aug 30 2018, 11:38 AM
zturner accepted this revision.Aug 30 2018, 1:55 PM
This revision is now accepted and ready to land.Aug 30 2018, 1:55 PM
This revision was automatically updated to reflect the committed changes.