[ASTImporter] Use llvm::Expected and Error in the importer API
authorGabor Marton <martongabesz@gmail.com>
Wed, 15 May 2019 10:29:48 +0000 (10:29 +0000)
committerGabor Marton <martongabesz@gmail.com>
Wed, 15 May 2019 10:29:48 +0000 (10:29 +0000)
commit5ac6d49065df82b7015fabb533e7a130b8e7f86f
tree796c2bbbb010d9f1168829a7d2c16a717b4ce25d
parentda08fae397092d9f117378f07061c326de05251c
[ASTImporter] Use llvm::Expected and Error in the importer API

Summary:
This is the final phase of the refactoring towards using llvm::Expected
and llvm::Error in the ASTImporter API.
This involves the following:
- remove old Import functions which returned with a pointer,
- use the Import_New functions (which return with Err or Expected) everywhere
  and handle their return value
- rename Import_New functions to Import
This affects both Clang and LLDB.

Reviewers: shafik, teemperor, aprantl, a_sidorin, balazske, a.sidorin

Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits, lldb-commits

Tags: #clang, #lldb

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

llvm-svn: 360760
12 files changed:
clang/include/clang/AST/ASTImporter.h
clang/lib/AST/ASTImporter.cpp
clang/lib/AST/ExternalASTMerger.cpp
clang/lib/CrossTU/CrossTranslationUnit.cpp
clang/lib/Frontend/ASTMerge.cpp
clang/unittests/AST/ASTImporterFixtures.cpp
clang/unittests/AST/ASTImporterTest.cpp
lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp
lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp
lldb/source/Symbol/ClangASTContext.cpp
lldb/source/Symbol/ClangASTImporter.cpp
lldb/source/Symbol/CxxModuleHandler.cpp