diff options
| author | Gabor Marton <martongabesz@gmail.com> | 2019-05-15 10:29:48 +0000 |
|---|---|---|
| committer | Gabor Marton <martongabesz@gmail.com> | 2019-05-15 10:29:48 +0000 |
| commit | 5ac6d49065df82b7015fabb533e7a130b8e7f86f (patch) | |
| tree | 796c2bbbb010d9f1168829a7d2c16a717b4ce25d /clang/unittests/AST/ASTImporterFixtures.cpp | |
| parent | da08fae397092d9f117378f07061c326de05251c (diff) | |
| download | bcm5719-llvm-5ac6d49065df82b7015fabb533e7a130b8e7f86f.tar.gz bcm5719-llvm-5ac6d49065df82b7015fabb533e7a130b8e7f86f.zip | |
[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
Diffstat (limited to 'clang/unittests/AST/ASTImporterFixtures.cpp')
| -rw-r--r-- | clang/unittests/AST/ASTImporterFixtures.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/unittests/AST/ASTImporterFixtures.cpp b/clang/unittests/AST/ASTImporterFixtures.cpp index eeb4821a715..a0273b617e5 100644 --- a/clang/unittests/AST/ASTImporterFixtures.cpp +++ b/clang/unittests/AST/ASTImporterFixtures.cpp @@ -72,7 +72,7 @@ void ASTImporterTestBase::TU::lazyInitImporter( Decl *ASTImporterTestBase::TU::import(ASTImporterLookupTable &LookupTable, ASTUnit *ToAST, Decl *FromDecl) { lazyInitImporter(LookupTable, ToAST); - if (auto ImportedOrErr = Importer->Import_New(FromDecl)) + if (auto ImportedOrErr = Importer->Import(FromDecl)) return *ImportedOrErr; else { llvm::consumeError(ImportedOrErr.takeError()); @@ -83,7 +83,7 @@ Decl *ASTImporterTestBase::TU::import(ASTImporterLookupTable &LookupTable, QualType ASTImporterTestBase::TU::import(ASTImporterLookupTable &LookupTable, ASTUnit *ToAST, QualType FromType) { lazyInitImporter(LookupTable, ToAST); - if (auto ImportedOrErr = Importer->Import_New(FromType)) + if (auto ImportedOrErr = Importer->Import(FromType)) return *ImportedOrErr; else { llvm::consumeError(ImportedOrErr.takeError()); |

