[Lldb-commits] [PATCH] D102811: [lldb] Move ClangModulesDeclVendor ownership to ClangPersistentVariables from Target

Raphael Isemann via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed May 19 14:13:57 PDT 2021


teemperor added a comment.
Herald added a subscriber: JDevlieghere.

First and foremost: Cool new username. +1 from me.

Otherwise I think Shafik's comment in D79752 <https://reviews.llvm.org/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.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D102811/new/

https://reviews.llvm.org/D102811



More information about the lldb-commits mailing list