More decoupling of plugins and non-plugins. Target doesn't need to
manage ClangModulesDeclVendor and ClangPersistentVariables is always available
in situations where you need ClangModulesDeclVendor.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
First and foremost: Cool new username. +1 from me.
Otherwise I think Shafik's comment in D79752 still applies here. Could you make a short utility function for that chunk of code and put in ClangASTSource (ClangExpressionDeclMap inherits from this, so you can remove that part form both classes):
auto persistent_vars = llvm::cast<ClangPersistentVariables>( m_target->GetPersistentExpressionStateForLanguage(lldb::eLanguageTypeC)); std::shared_ptr<ClangModulesDeclVendor> modules_decl_vendor = persistent_vars->GetClangModulesDeclVendor();
Just something like ClangModulesDeclVendor &ClangASTSource::GetClangModulesDeclVendor() { ... } seems fine.
Beside that I think this is good to go.
Comment Actions
LGTM. Soon LLDB will be as nicely layered (and maybe as tasty) as some good Schichttorte
clang-tidy: error: 'lldb/Host/Config.h' file not found [clang-diagnostic-error]
not useful