summaryrefslogtreecommitdiff
path: root/lib/CrossTU
diff options
context:
space:
mode:
authorGabor Marton <martongabesz@gmail.com>2019-05-15 10:29:48 +0000
committerGabor Marton <martongabesz@gmail.com>2019-05-15 10:29:48 +0000
commitb211b92b8811a6f926a11912ca97291d56486d2a (patch)
tree5aa941e420e8c3a9f9acef91440f86300d8c3a6e /lib/CrossTU
parent268b249f1d4cbc212d1853ac9821194f868eef36 (diff)
downloadclang-b211b92b8811a6f926a11912ca97291d56486d2a.tar.gz
[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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@360760 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CrossTU')
-rw-r--r--lib/CrossTU/CrossTranslationUnit.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CrossTU/CrossTranslationUnit.cpp b/lib/CrossTU/CrossTranslationUnit.cpp
index 9b68f3726e..f504082ad3 100644
--- a/lib/CrossTU/CrossTranslationUnit.cpp
+++ b/lib/CrossTU/CrossTranslationUnit.cpp
@@ -398,7 +398,7 @@ CrossTranslationUnitContext::importDefinitionImpl(const T *D) {
assert(hasBodyOrInit(D) && "Decls to be imported should have body or init.");
ASTImporter &Importer = getOrCreateASTImporter(D->getASTContext());
- auto ToDeclOrError = Importer.Import_New(D);
+ auto ToDeclOrError = Importer.Import(D);
if (!ToDeclOrError) {
handleAllErrors(ToDeclOrError.takeError(),
[&](const ImportError &IE) {