[Lldb-commits] [PATCH] D59537: Instantiate 'std' templates explicitly in the expression evaluator
Gabor Marton via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Mar 25 06:52:15 PDT 2019
martong added inline comments.
================
Comment at: lldb/source/Symbol/StdModuleHandler.cpp:242
+ // Instantiate the template.
+ found_decl = ClassTemplateSpecializationDecl::Create(
+ m_sema->getASTContext(),
----------------
martong wrote:
> Is there any guarantee that the before any subsequent clang::ASTImporter::Import call this newly created node is registered as imported (via ASTImporter::MapImported)?
>
> The reason why I am asking this is because we have to enforce in clang::ASTImporter that after every Decl is created then immediately it is registered as an imported Decl, see `ASTImporter::GetImportedOrCreateDecl`. This we we make sure that no subsequent import calls will create the same node again.
> The cycles in the AST are handled properly only this way.
>
> This is one reason which makes me worried about exposing the import mechanism via `ImportInternal`. Would it be working if `GetImportedOrCreateDecl` was virtual and overridden here?
> Would it be working if GetImportedOrCreateDecl was virtual and overridden here?
Sorry, that would certainly not work, but perhaps a virtual hook inside that function could work...
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59537/new/
https://reviews.llvm.org/D59537
More information about the lldb-commits
mailing list