[FileSystemStatCache] Return std::error_code from stat cache methods
authorHarlan Haskins <harlan@harlanhaskins.com>
Tue, 16 Apr 2019 17:34:26 +0000 (17:34 +0000)
committerHarlan Haskins <harlan@harlanhaskins.com>
Tue, 16 Apr 2019 17:34:26 +0000 (17:34 +0000)
commiteec3c0f9e304d9832a62ccfb064ed83600648d57
tree3f140250440938f934b26affb6f13a09a1984fb2
parent9e31584e78755f02076bec71a106572555648a48
[FileSystemStatCache] Return std::error_code from stat cache methods

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.

This change is NFC.

Reviewers: benlangmuir, arphaman

Subscribers: dexonsmith, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D60735

llvm-svn: 358509
clang/include/clang/Basic/FileSystemStatCache.h
clang/lib/Basic/FileManager.cpp
clang/lib/Basic/FileSystemStatCache.cpp