[Lldb-commits] [PATCH] D59485: [ASTImporter] Allow adding a shim to the ASTImporter

Raphael Isemann via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Mar 18 05:42:19 PDT 2019

teemperor created this revision.
teemperor added reviewers: martong, balazske, a.sidorin, shafik.
Herald added subscribers: cfe-commits, rnkovacs.
Herald added a project: clang.

We are currently implementing support in LLDB that reconstructs the STL templates from
the target program in the expression evaluator. This reconstruction happens during the
import process from our debug info AST into the expression evaluation AST[1], which means
we need a way to intercept the ASTImporter import process in some controlled fashion.

This patch adds a shim to the ASTImporter that allows us to intercept any Import calls an
ASTImporter may make (either externally or while importing internally). We then provide
a shim in LLDB that does do our template reconstruction.

The shim is on purpose not reusing some ASTImporter functionalities like the map of already
imported decls because we want to keep it flexible. If a Shim wants to use this functionality
it needs to update/check the map itself.

[1] The reason for this is that we can't reliable import templates with the ASTImporter, so
actually reconstructing the template in the debug info AST and then importing it doesn't work.
It would also be much slower.

  rC Clang



-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59485.191066.patch
Type: text/x-patch
Size: 8269 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190318/2a7c05ef/attachment.bin>

More information about the lldb-commits mailing list