HomePhabricator

[Expression parser] Setting to enable use of ExternalASTMerger

Description

[Expression parser] Setting to enable use of ExternalASTMerger

This setting can be enabled like this at the target level:

(lldb) settings set target.experimental.use-modern-type-lookup true

This causes several new behaviors in the Clang expression parser:

  • It completely disables use of ClangASTImporter. None are created at all, and all users of it are now conditionalized on its presence.
  • It instead constructs a per-expression ExternalASTMerger, which exists inside Clang and contains much of the type completion logic that hitherto lived in ExternalASTSource, ClangExpressionDeclMap, and ClangASTImporter.
  • The expression parser uses this Merger as a backend for copying and completing types.
  • It also constructs a persistent ExternalASTMerger which is connected to the Target's persistent AST context.

This is a major chunk of LLDB functionality moved into Clang. It
can be tested in two ways:

  1. For an individual debug session, enable the setting before running a target.
  1. For the testsuite, change the option to be default-true. This is done in Target.cpp's g_experimental_properties. The testsuite is not yet clean with this, so I have not committed that switch.

I have filed a Bugzilla for extending the testsuite to allow
custom settings for all tests:

https://bugs.llvm.org/show_bug.cgi?id=34771

I have also filed a Bugzilla for fixing the remaining testsuite
failures with this setting enabled:

https://bugs.llvm.org/show_bug.cgi?id=34772

Details

Committed
spyffeSep 28 2017, 1:20 PM
Parents
rL314457: [X86] Make use of vpmovwb when possible in LowerMULH
Branches
Unknown
Tags
Unknown