SetMustBuildLookupTable() must always be called on a primary context.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
We have a change in Clang/ASTImporter which causes an LLDB assertion, unless this patch is applied.
The related change is https://reviews.llvm.org/D53655
In that patch we change the importer to properly import the redecl chains of RecordDecls. Consequently the to_tag_decl here in LLDB may not always be the PrimaryContext anymore, thus we have to explicitly use the primary context.
Can you write an lldb test for this?
There is already an existing test for that:
2: test_expr_dwarf (TestSharedLib.SharedLibTestCase) Test that types work when defined in a shared library and forward-declared in the main executable ... python: ../../git/llvm/tools/clang/include/clang/AST/DeclBase.h:2298: void clang::DeclContext::setMustBuildLookupTable(): Assertion `this == getPrimaryContext() && "should only be called on primary context"' failed.
Cool, thanks. Is this failing only on linux? Do you happen to have a buildbot link that shows the failure?
Thanks!
Is this failing only on linux? Do you happen to have a buildbot link that shows the failure?
This LLDB patch is to prevent the buildbot failure when we commit this Clang/ASTImporter patch : https://reviews.llvm.org/D53655