Page MenuHomePhabricator

[FileSystemStatCache] Return std::error_code from stat cache methods
ClosedPublic

Authored by harlanhaskins on Apr 15 2019, 3:29 PM.

Details

Summary

Previously, we would return true/false signifying if the cache/lookup
succeeded or failed. Instead, provide clients with the underlying error
that was thrown while attempting to look up in the cache.

Since clang::FileManager doesn't make use of this information, it discards the
error that's received and casts away to bool.

Event Timeline

harlanhaskins created this revision.Apr 15 2019, 3:29 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 15 2019, 3:29 PM

LGTM, but I'd appreciate someone who has worked on this more recently taking a look.

arphaman accepted this revision.Apr 16 2019, 10:09 AM

LGTM, please mark it as NFC

This revision is now accepted and ready to land.Apr 16 2019, 10:09 AM
This revision was automatically updated to reflect the committed changes.