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/Optional.h" 29 #include "llvm/ADT/SmallVector.h" 30 #include "llvm/Support/Error.h" 36 class ASTImporterLookupTable;
37 class CXXBaseSpecifier;
38 class CXXCtorInitializer;
68 void log(raw_ostream &OS)
const override;
88 llvm::DenseMap<const CXXBaseSpecifier *, CXXBaseSpecifier *>;
109 bool LastDiagFromFrom =
false;
113 llvm::DenseMap<const Type *, const Type *> ImportedTypes;
117 llvm::DenseMap<Decl *, Decl *> ImportedDecls;
121 llvm::DenseMap<Stmt *, Stmt *> ImportedStmts;
125 llvm::DenseMap<FileID, FileID> ImportedFileIDs;
139 void AddToLookupTable(
Decl *ToD);
174 template <
typename ImportT>
178 return llvm::make_error<ImportError>();
179 return llvm::Error::success();
220 return Import_New(const_cast<Decl *>(FromD));
225 return Import(const_cast<Decl *>(FromD));
231 Decl *GetAlreadyImportedOrNull(
const Decl *FromD)
const;
362 void ImportDefinition(
Decl *From);
421 virtual void CompleteDecl(
Decl* D);
441 bool Complain =
true);
453 #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.
Not supported node or case.
virtual Decl * GetOriginalDecl(Decl *To)
Called by StructuralEquivalenceContext.
FileManager & getFromFileManager() const
Retrieve the file manager that AST nodes are being imported from.
One of these records is kept for each identifier that is lexed.
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.
void log(raw_ostream &OS) const override
llvm::DenseMap< const CXXBaseSpecifier *, CXXBaseSpecifier * > ImportedCXXBaseSpecifierMap
ASTContext & getToContext() const
Retrieve the context that AST nodes are being imported into.
A little helper class used to produce diagnostics.
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.
std::error_code convertToErrorCode() const override
ImportError(ErrorKind Error)
Encodes a location in the source.
static bool IsStructurallyEquivalent(StructuralEquivalenceContext &Context, QualType T1, QualType T2)
Determine structural equivalence of two types.
ImportError(const ImportError &Other)
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...
Naming ambiguity (likely ODR violation).
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.
Dataflow Directional Tag Classes.
DeclContext - This is used only as base class of specific decl types that can act as declaration cont...
LLVM_NODISCARD llvm::Error importInto(ImportT &To, const ImportT &From)
Import the given object, returns the result.
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.
Defines the clang::SourceLocation class and associated facilities.
ASTContext & getFromContext() const
Retrieve the context that AST nodes are being imported from.
llvm::Expected< Decl * > Import_New(const Decl *FromD)
std::string toString() const
A trivial tuple used to represent a source range.
This represents a decl that may have a name.
Attr - This represents one attribute.
ErrorKind
Kind of error when importing an AST component.