15 #ifndef LLVM_CLANG_AST_ASTIMPORTER_H 16 #define LLVM_CLANG_AST_ASTIMPORTER_H 26 #include "llvm/ADT/DenseMap.h" 27 #include "llvm/ADT/DenseSet.h" 28 #include "llvm/ADT/SmallVector.h" 34 class CXXBaseSpecifier;
35 class CXXCtorInitializer;
61 llvm::DenseMap<const CXXBaseSpecifier *, CXXBaseSpecifier *>;
74 bool LastDiagFromFrom =
false;
78 llvm::DenseMap<const Type *, const Type *> ImportedTypes;
82 llvm::DenseMap<Decl *, Decl *> ImportedDecls;
86 llvm::DenseMap<Stmt *, Stmt *> ImportedStmts;
90 llvm::DenseMap<FileID, FileID> ImportedFileIDs;
152 return Import(const_cast<Decl *>(FromD));
335 bool Complain =
true);
340 #endif // LLVM_CLANG_AST_ASTIMPORTER_H Smart pointer class that efficiently represents Objective-C method names.
A (possibly-)qualified type.
Implements support for file system lookup, file system caching, and directory search management...
Stmt - This represents one statement.
C Language Family Type Representation.
Decl - This represents one declaration (or definition), e.g.
The l-value was an access to a declared entity or something equivalently strong, like the address of ...
A container of type source information.
virtual Decl * GetOriginalDecl(Decl *To)
Called by StructuralEquivalenceContext.
FileManager & getFromFileManager() const
Retrieve the file manager that AST nodes are being imported from.
DiagnosticBuilder ToDiag(SourceLocation Loc, unsigned DiagID)
Report a diagnostic in the "to" context.
QualType Import(QualType FromT)
Import the given type from the "from" context into the "to" context.
virtual DeclarationName HandleNameConflict(DeclarationName Name, DeclContext *DC, unsigned IDNS, NamedDecl **Decls, unsigned NumDecls)
Cope with a name conflict when importing a declaration into the given context.
One of these records is kept for each identifier that is lexed.
DiagnosticBuilder FromDiag(SourceLocation Loc, unsigned DiagID)
Report a diagnostic in the "from" context.
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
A C++ nested-name-specifier augmented with source location information.
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified...
Defines the Diagnostic-related interfaces.
bool IsStructurallyEquivalent(QualType From, QualType To, bool Complain=true)
Determine whether the given types are structurally equivalent.
llvm::DenseMap< const CXXBaseSpecifier *, CXXBaseSpecifier * > ImportedCXXBaseSpecifierMap
ASTImporter(ASTContext &ToContext, FileManager &ToFileManager, ASTContext &FromContext, FileManager &FromFileManager, bool MinimalImport)
Create a new AST importer.
ASTContext & getToContext() const
Retrieve the context that AST nodes are being imported into.
Decl * MapImported(Decl *From, Decl *To)
Store and assign the imported declaration to its counterpart.
A little helper class used to produce diagnostics.
Expr - This represents one expression.
Represents a C++ template name within the type system.
llvm::SmallVector< Decl *, 2 > getCanonicalForwardRedeclChain(Decl *D)
Defines the clang::IdentifierInfo, clang::IdentifierTable, and clang::Selector interfaces.
Decl * GetAlreadyImportedOrNull(Decl *FromD)
Return the copy of the given declaration in the "to" context if it has already been imported from the...
Encodes a location in the source.
Represents a C++ nested name specifier, such as "\::std::vector<int>::".
bool isMinimalImport() const
Whether the importer will perform a minimal import, creating to-be-completed forward declarations whe...
FileManager & getToFileManager() const
Retrieve the file manager that AST nodes are being imported into.
virtual Decl * Imported(Decl *From, Decl *To)
Subclasses can override this function to observe all of the From -> To declaration mappings as they a...
An opaque identifier used by SourceManager which refers to a source file (MemoryBuffer) along with it...
NonEquivalentDeclSet & getNonEquivalentDecls()
Return the set of declarations that we know are not equivalent.
virtual void CompleteDecl(Decl *D)
Called for ObjCInterfaceDecl, ObjCProtocolDecl, and TagDecl.
Dataflow Directional Tag Classes.
DeclContext - This is used only as base class of specific decl types that can act as declaration cont...
DeclarationName - The name of a declaration.
Imports selected nodes from one AST context into another context, merging AST nodes where appropriate...
Represents a C++ base or member initializer.
Decl * Import(const Decl *FromD)
Represents a base class of a C++ class.
void ImportDefinition(Decl *From)
Import the definition of the given declaration, including all of the declarations it contains...
Defines the clang::SourceLocation class and associated facilities.
ASTContext & getFromContext() const
Retrieve the context that AST nodes are being imported from.
A trivial tuple used to represent a source range.
This represents a decl that may have a name.
DeclContext * ImportContext(DeclContext *FromDC)
Import the given declaration context from the "from" AST context into the "to" AST context...
Attr - This represents one attribute.