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 Member Functions | |
void | MarkDeclImported (clang::Decl *from, clang::Decl *to) |
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 285 of file ClangASTImporter.h.
|
inline |
Definition at line 286 of file ClangASTImporter.h.
References lldb_private::ClangASTImporter::ClangASTImporter(), lldbassert, lldb_private::ClangASTImporter::m_file_manager, m_main, and m_source_ctx.
Referenced by lldb_private::ClangASTImporter::ASTImporterDelegate::CxxModuleScope::CxxModuleScope().
|
override |
Definition at line 1438 of file ClangASTImporter.cpp.
References m_main.
void ClangASTImporter::ASTImporterDelegate::ImportDefinitionTo | ( | clang::Decl * | to, |
clang::Decl * | from ) |
Definition at line 1142 of file ClangASTImporter.cpp.
References lldb_private::AST, lldb_private::Expressions, lldb_private::GetLog(), lldb_private::ClangASTImporter::Import(), LLDB_LOG, LLDB_LOG_ERROR, and m_source_ctx.
|
override |
Definition at line 1283 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, m_decls_to_ignore, m_main, m_new_decl_listener, m_source_ctx, MarkDeclImported(), RemapModule(), lldb_private::TypeSystemClang::SetOwningModule(), and lldb_private::ClangASTImporter::DeclOrigin::Valid().
|
overrideprotected |
Definition at line 1050 of file ClangASTImporter.cpp.
References lldb_private::ClangASTImporter::DeclOrigin::ctx, lldb_private::ClangASTImporter::DeclOrigin::decl, lldb_private::Expressions, lldb_private::GetLog(), lldb_private::ClangASTImporter::Import(), LLDB_LOG, m_decls_to_ignore, m_main, m_std_handler, and lldb_private::ClangASTImporter::DeclOrigin::Valid().
|
private |
Definition at line 1391 of file ClangASTImporter.cpp.
References lldb_private::Expressions, lldb_private::GetLog(), LLDB_LOG, m_main, and MaybeCompleteReturnType().
Referenced by Imported().
|
inline |
Definition at line 345 of file ClangASTImporter.h.
References m_new_decl_listener.
|
inline |
Definition at line 341 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 357 of file ClangASTImporter.h.
Referenced by Imported(), and ImportImpl().
|
private |
Definition at line 358 of file ClangASTImporter.h.
Referenced by ASTImporterDelegate(), GetOriginalDecl(), Imported(), ImportImpl(), and MarkDeclImported().
|
private |
The currently attached listener.
Definition at line 362 of file ClangASTImporter.h.
Referenced by Imported(), RemoveImportListener(), and SetImportListener().
|
private |
Definition at line 359 of file ClangASTImporter.h.
Referenced by ASTImporterDelegate(), ImportDefinitionTo(), and Imported().
|
private |
Definition at line 360 of file ClangASTImporter.h.
Referenced by lldb_private::ClangASTImporter::ASTImporterDelegate::CxxModuleScope::CxxModuleScope(), and ImportImpl().