summaryrefslogtreecommitdiffstats
path: root/clang/tools/clang-import-test
diff options
context:
space:
mode:
authorHarlan Haskins <harlan@harlanhaskins.com>2019-08-01 21:31:56 +0000
committerHarlan Haskins <harlan@harlanhaskins.com>2019-08-01 21:31:56 +0000
commit8d323d150610bed1feeb79d7a29c9958a4c8bcac (patch)
tree166514f9a8bba05ea1504afab5c319975a57675d /clang/tools/clang-import-test
parent461f0722dd26487c1faa497ba37aabed1477a561 (diff)
downloadbcm5719-llvm-8d323d150610bed1feeb79d7a29c9958a4c8bcac.tar.gz
bcm5719-llvm-8d323d150610bed1feeb79d7a29c9958a4c8bcac.zip
[clang] Adopt new FileManager error-returning APIs
Update the callers of FileManager::getFile and FileManager::getDirectory to handle the new llvm::ErrorOr-returning methods. Signed-off-by: Harlan Haskins <harlan@apple.com> llvm-svn: 367616
Diffstat (limited to 'clang/tools/clang-import-test')
-rw-r--r--clang/tools/clang-import-test/clang-import-test.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/tools/clang-import-test/clang-import-test.cpp b/clang/tools/clang-import-test/clang-import-test.cpp
index cd9841241cb..e94f4bb00ad 100644
--- a/clang/tools/clang-import-test/clang-import-test.cpp
+++ b/clang/tools/clang-import-test/clang-import-test.cpp
@@ -286,12 +286,12 @@ CIAndOrigins BuildIndirect(CIAndOrigins &CI) {
llvm::Error ParseSource(const std::string &Path, CompilerInstance &CI,
ASTConsumer &Consumer) {
SourceManager &SM = CI.getSourceManager();
- const FileEntry *FE = CI.getFileManager().getFile(Path);
+ auto FE = CI.getFileManager().getFile(Path);
if (!FE) {
return llvm::make_error<llvm::StringError>(
llvm::Twine("Couldn't open ", Path), std::error_code());
}
- SM.setMainFileID(SM.createFileID(FE, SourceLocation(), SrcMgr::C_User));
+ SM.setMainFileID(SM.createFileID(*FE, SourceLocation(), SrcMgr::C_User));
ParseAST(CI.getPreprocessor(), &Consumer, CI.getASTContext());
return llvm::Error::success();
}
OpenPOWER on IntegriCloud