[clang] Change FileManager to use llvm::ErrorOr instead of null on failure
authorHarlan Haskins <harlan@harlanhaskins.com>
Thu, 1 Aug 2019 21:32:04 +0000 (21:32 +0000)
committerHarlan Haskins <harlan@harlanhaskins.com>
Thu, 1 Aug 2019 21:32:04 +0000 (21:32 +0000)
commit84586c1423aae1ca12f5203215b0eeb7c148ed6d
tree651f0aab7749c7811172b0a0e9887332981b24c3
parenta02f85768d2d1a77c7735ddd43226e1be51f3730
[clang] Change FileManager to use llvm::ErrorOr instead of null on failure

Summary:
Currently, clang's FileManager uses NULL as an indicator that a particular file
did not exist, but would not propagate errors like permission issues. Instead,
teach FileManager to use llvm::ErrorOr internally and return rich errors for
failures.

Reviewers: arphaman, bruno, martong, shafik

Subscribers: nemanjai, kbarton, MaskRay, jkorous, dexonsmith, kadircet, jsji, cfe-commits, lldb-commits

Tags: #clang, #lldb

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

llvm-svn: 367618
lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp