15 #ifndef LLVM_CLANG_AST_ASTIMPORTERSHAREDSTATE_H 16 #define LLVM_CLANG_AST_ASTIMPORTERSHAREDSTATE_H 20 #include "llvm/ADT/DenseMap.h" 26 class TranslationUnitDecl;
33 std::unique_ptr<ASTImporterLookupTable> LookupTable;
41 llvm::DenseMap<Decl *, ImportError> ImportErrors;
50 LookupTable = std::make_unique<ASTImporterLookupTable>(ToTU);
57 if (
auto *ND = dyn_cast<NamedDecl>(D))
63 if (
auto *ND = dyn_cast<NamedDecl>(D))
64 LookupTable->remove(ND);
68 auto Pos = ImportErrors.find(ToD);
69 if (Pos != ImportErrors.end())
76 ImportErrors[To] =
Error;
81 #endif // LLVM_CLANG_AST_ASTIMPORTERSHAREDSTATE_H Decl - This represents one declaration (or definition), e.g.
Importer specific state, which may be shared amongst several ASTImporter objects. ...
ASTImporterSharedState(TranslationUnitDecl &ToTU)
ASTImporterLookupTable * getLookupTable()
ASTImporterSharedState()=default
Dataflow Directional Tag Classes.
void addDeclToLookup(Decl *D)
void setImportDeclError(Decl *To, ImportError Error)
void removeDeclFromLookup(Decl *D)
llvm::Optional< ImportError > getImportDeclErrorIfAny(Decl *ToD) const
The top declaration context.