LLDB mainline
|
ASTImporter that intercepts and records the import process of the underlying ASTImporter. More...
#include <ClangASTImporter.h>
Classes | |
class | CxxModuleScope |
Scope guard that attaches a CxxModuleHandler to an ASTImporterDelegate and deattaches it at the end of the scope. More... | |
Public Member Functions | |
ASTImporterDelegate (ClangASTImporter &main, clang::ASTContext *target_ctx, clang::ASTContext *source_ctx) | |
void | ImportDefinitionTo (clang::Decl *to, clang::Decl *from) |
void | Imported (clang::Decl *from, clang::Decl *to) override |
clang::Decl * | GetOriginalDecl (clang::Decl *To) override |
void | SetImportListener (NewDeclListener *listener) |
void | RemoveImportListener () |
Protected Member Functions | |
llvm::Expected< clang::Decl * > | ImportImpl (clang::Decl *From) override |
Private Attributes | |
llvm::SmallPtrSet< clang::Decl *, 16 > | m_decls_to_ignore |
Decls we should ignore when mapping decls back to their original ASTContext. | |
ClangASTImporter & | m_main |
clang::ASTContext * | m_source_ctx |
CxxModuleHandler * | m_std_handler = nullptr |
NewDeclListener * | m_new_decl_listener = nullptr |
The currently attached listener. | |
ASTImporter that intercepts and records the import process of the underlying ASTImporter.
This class updates the map from declarations to their original declarations and can record declarations that have been imported in a certain interval.
When intercepting a declaration import, the ASTImporterDelegate uses the CxxModuleHandler to replace any missing or malformed declarations with their counterpart from a C++ module.
Definition at line 283 of file ClangASTImporter.h.
|
inline |
Definition at line 284 of file ClangASTImporter.h.
References lldbassert.
|
override |
Definition at line 1412 of file ClangASTImporter.cpp.
void ClangASTImporter::ASTImporterDelegate::ImportDefinitionTo | ( | clang::Decl * | to, |
clang::Decl * | from | ||
) |
Definition at line 1137 of file ClangASTImporter.cpp.
References lldb_private::AST, lldb_private::Expressions, lldb_private::GetLog(), lldb_private::ClangASTImporter::Import(), LLDB_LOG, and LLDB_LOG_ERROR.
|
override |
Definition at line 1263 of file ClangASTImporter.cpp.
References lldb_private::ClangASTImporter::DeclOrigin::ctx, lldb_private::ClangASTImporter::DeclOrigin::decl, lldb_private::Expressions, lldb_private::GetLog(), LLDB_INVALID_UID, LLDB_LOG, MaybeCompleteReturnType(), RemapModule(), lldb_private::TypeSystemClang::SetOwningModule(), and lldb_private::ClangASTImporter::DeclOrigin::Valid().
|
overrideprotected |
Definition at line 1055 of file ClangASTImporter.cpp.
References lldb_private::ClangASTImporter::CopyDecl(), lldb_private::ClangASTImporter::DeclOrigin::ctx, lldb_private::ClangASTImporter::DeclOrigin::decl, lldb_private::Expressions, lldb_private::ClangASTImporter::GetDeclMetadata(), lldb_private::ClangASTImporter::GetDeclOrigin(), lldb_private::GetLog(), lldb_private::CxxModuleHandler::Import(), lldb_private::ClangASTImporter::Import(), LLDB_LOG, m_decls_to_ignore, m_main, m_std_handler, and lldb_private::ClangASTImporter::DeclOrigin::Valid().
|
inline |
Definition at line 343 of file ClangASTImporter.h.
References m_new_decl_listener.
|
inline |
Definition at line 339 of file ClangASTImporter.h.
References m_new_decl_listener.
|
private |
Decls we should ignore when mapping decls back to their original ASTContext.
Used by the CxxModuleHandler to mark declarations that were created from the 'std' C++ module to prevent that the Importer tries to sync them with the broken equivalent in the debug info AST.
Definition at line 353 of file ClangASTImporter.h.
Referenced by ImportImpl().
|
private |
Definition at line 354 of file ClangASTImporter.h.
Referenced by ImportImpl().
|
private |
The currently attached listener.
Definition at line 358 of file ClangASTImporter.h.
Referenced by RemoveImportListener(), and SetImportListener().
|
private |
Definition at line 355 of file ClangASTImporter.h.
|
private |
Definition at line 356 of file ClangASTImporter.h.
Referenced by lldb_private::ClangASTImporter::ASTImporterDelegate::CxxModuleScope::CxxModuleScope(), ImportImpl(), and lldb_private::ClangASTImporter::ASTImporterDelegate::CxxModuleScope::~CxxModuleScope().