LLDB mainline
|
#include <ClangASTImporter.h>
Public Member Functions | |
ASTContextMetadata (clang::ASTContext *dst_ctx) | |
void | setOrigin (const clang::Decl *decl, DeclOrigin origin) |
Sets the DeclOrigin for the given Decl and overwrites any existing DeclOrigin. | |
void | removeOrigin (const clang::Decl *decl) |
Removes any tracked DeclOrigin for the given decl. | |
void | removeOriginsWithContext (clang::ASTContext *ctx) |
Remove all DeclOrigin entries that point to the given ASTContext. | |
DeclOrigin | getOrigin (const clang::Decl *decl) const |
Returns the DeclOrigin for the given Decl or an invalid DeclOrigin instance if there no known DeclOrigin for the given Decl. | |
bool | hasOrigin (const clang::Decl *decl) const |
Returns true there is a known DeclOrigin for the given Decl. | |
Public Attributes | |
clang::ASTContext * | m_dst_ctx |
DelegateMap | m_delegates |
NamespaceMetaMap | m_namespace_maps |
MapCompleter * | m_map_completer = nullptr |
Private Types | |
typedef llvm::DenseMap< const clang::Decl *, DeclOrigin > | OriginMap |
Private Attributes | |
OriginMap | m_origins |
Maps declarations to the ASTContext/Decl from which they were imported from. | |
Definition at line 366 of file ClangASTImporter.h.
|
private |
Definition at line 367 of file ClangASTImporter.h.
|
inline |
Definition at line 370 of file ClangASTImporter.h.
|
inline |
Returns the DeclOrigin for the given Decl or an invalid DeclOrigin instance if there no known DeclOrigin for the given Decl.
Definition at line 409 of file ClangASTImporter.h.
References m_origins.
Referenced by hasOrigin().
|
inline |
Returns true there is a known DeclOrigin for the given Decl.
Definition at line 417 of file ClangASTImporter.h.
References getOrigin(), and lldb_private::ClangASTImporter::DeclOrigin::Valid().
|
inline |
Removes any tracked DeclOrigin for the given decl.
Definition at line 392 of file ClangASTImporter.h.
References m_origins.
|
inline |
Remove all DeclOrigin entries that point to the given ASTContext.
Useful when an ASTContext is about to be deleted and all the dangling pointers to it need to be removed.
Definition at line 397 of file ClangASTImporter.h.
References m_origins.
|
inline |
Sets the DeclOrigin for the given Decl and overwrites any existing DeclOrigin.
Definition at line 380 of file ClangASTImporter.h.
References lldb_private::ClangASTImporter::DeclOrigin::ctx, lldb_private::ClangASTImporter::DeclOrigin::decl, and m_origins.
DelegateMap lldb_private::ClangASTImporter::ASTContextMetadata::m_delegates |
Definition at line 373 of file ClangASTImporter.h.
clang::ASTContext* lldb_private::ClangASTImporter::ASTContextMetadata::m_dst_ctx |
Definition at line 372 of file ClangASTImporter.h.
MapCompleter* lldb_private::ClangASTImporter::ASTContextMetadata::m_map_completer = nullptr |
Definition at line 376 of file ClangASTImporter.h.
NamespaceMetaMap lldb_private::ClangASTImporter::ASTContextMetadata::m_namespace_maps |
Definition at line 375 of file ClangASTImporter.h.
|
private |
Maps declarations to the ASTContext/Decl from which they were imported from.
If a declaration is from an ASTContext which has been deleted since the declaration was imported or the declaration wasn't created by the ASTImporter, then it doesn't have a DeclOrigin and will not be tracked here.
Definition at line 427 of file ClangASTImporter.h.
Referenced by getOrigin(), removeOrigin(), removeOriginsWithContext(), and setOrigin().