Differential D79752 Diff 266389 lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp
Changeset View
Changeset View
Standalone View
Standalone View
lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp
Show First 20 Lines • Show All 1,002 Lines • ▼ Show 20 Lines | |||||
void ClangExpressionDeclMap::LookupInModulesDeclVendor( | void ClangExpressionDeclMap::LookupInModulesDeclVendor( | ||||
NameSearchContext &context, ConstString name) { | NameSearchContext &context, ConstString name) { | ||||
Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS)); | Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS)); | ||||
if (!m_target) | if (!m_target) | ||||
return; | return; | ||||
auto *modules_decl_vendor = m_target->GetClangModulesDeclVendor(); | auto *persistent_vars = llvm::cast<ClangPersistentVariables>( | ||||
m_target->GetPersistentExpressionStateForLanguage(lldb::eLanguageTypeC)); | |||||
std::shared_ptr<ClangModulesDeclVendor> modules_decl_vendor = | |||||
persistent_vars->GetClangModulesDeclVendor(); | |||||
if (!modules_decl_vendor) | if (!modules_decl_vendor) | ||||
return; | return; | ||||
bool append = false; | bool append = false; | ||||
uint32_t max_matches = 1; | uint32_t max_matches = 1; | ||||
std::vector<clang::NamedDecl *> decls; | std::vector<clang::NamedDecl *> decls; | ||||
if (!modules_decl_vendor->FindDecls(name, append, max_matches, decls)) | if (!modules_decl_vendor->FindDecls(name, append, max_matches, decls)) | ||||
▲ Show 20 Lines • Show All 175 Lines • ▼ Show 20 Lines | void ClangExpressionDeclMap::LookupFunction( | ||||
if (!m_parser_vars) | if (!m_parser_vars) | ||||
return; | return; | ||||
Target *target = m_parser_vars->m_exe_ctx.GetTargetPtr(); | Target *target = m_parser_vars->m_exe_ctx.GetTargetPtr(); | ||||
std::vector<clang::NamedDecl *> decls_from_modules; | std::vector<clang::NamedDecl *> decls_from_modules; | ||||
if (target) { | if (target) { | ||||
if (ClangModulesDeclVendor *decl_vendor = | auto *persistent_vars = llvm::cast<ClangPersistentVariables>( | ||||
target->GetClangModulesDeclVendor()) { | target->GetPersistentExpressionStateForLanguage(lldb::eLanguageTypeC)); | ||||
if (std::shared_ptr<ClangModulesDeclVendor> decl_vendor = | |||||
persistent_vars->GetClangModulesDeclVendor()) { | |||||
decl_vendor->FindDecls(name, false, UINT32_MAX, decls_from_modules); | decl_vendor->FindDecls(name, false, UINT32_MAX, decls_from_modules); | ||||
} | } | ||||
} | } | ||||
const bool include_inlines = false; | const bool include_inlines = false; | ||||
SymbolContextList sc_list; | SymbolContextList sc_list; | ||||
if (namespace_decl && module_sp) { | if (namespace_decl && module_sp) { | ||||
const bool include_symbols = false; | const bool include_symbols = false; | ||||
▲ Show 20 Lines • Show All 748 Lines • Show Last 20 Lines |