Commit 466ea89f authored by Med Ismail Bennani's avatar Med Ismail Bennani
Browse files

[lldb] Fix failures when evaluating C++ expression and loading modules

This patch tentatively fixes the various test failures introduced
following 0ea3d88b:

https://green.lab.llvm.org/green/view/LLDB/job/as-lldb-cmake/6316/

From my understanding, the main issue here is that we can't find some headers
when evaluating C++ expressions since those headers have been promoted
to be system modules, and to be shipped as part of the toolchain.

Prior to 0ea3d88b, the `BuiltinHeadersInSystemModules` flag for in
the clang `LangOpts` struct was always set, however, after it landed,
the flag becomes opt-in, depending on toolchain that is used with the
compiler instance. This gets set in `clang::createInvocation` down to
`Darwin::addClangTargetOptions`, as this is used mostly on Apple platforms.

However, since `ClangExpressionParser` makes a dummy `CompilerInstance`,
and sets the various language options arbitrarily, instead of using the
`clang::createInvocation`, the flag remains unset, which causes the
var...
parent 8d203100
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment