diff options
author | dim <dim@FreeBSD.org> | 2015-09-06 15:21:47 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2015-09-06 15:21:47 +0000 |
commit | eaea1142467bd061be671b7775195ea69422a53f (patch) | |
tree | 6dbe733cbb748d293bbaa2b7616e76faff7118d5 /contrib/llvm/tools/lldb/source/Expression/ClangExpressionDeclMap.cpp | |
parent | ee8d011a70fa14b1e123f58d0139125f5e36173e (diff) | |
parent | 80b639cd40df427b9e325318efeec2d885a65f62 (diff) | |
download | FreeBSD-src-eaea1142467bd061be671b7775195ea69422a53f.zip FreeBSD-src-eaea1142467bd061be671b7775195ea69422a53f.tar.gz |
Update lldb to upstream trunk r242221.
Diffstat (limited to 'contrib/llvm/tools/lldb/source/Expression/ClangExpressionDeclMap.cpp')
-rw-r--r-- | contrib/llvm/tools/lldb/source/Expression/ClangExpressionDeclMap.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/contrib/llvm/tools/lldb/source/Expression/ClangExpressionDeclMap.cpp b/contrib/llvm/tools/lldb/source/Expression/ClangExpressionDeclMap.cpp index 1013bb5..2c66a0a 100644 --- a/contrib/llvm/tools/lldb/source/Expression/ClangExpressionDeclMap.cpp +++ b/contrib/llvm/tools/lldb/source/Expression/ClangExpressionDeclMap.cpp @@ -1527,6 +1527,31 @@ ClangExpressionDeclMap::FindExternalVisibleDecls (NameSearchContext &context, context.m_found.function_with_type_info = true; context.m_found.function = true; } + else if (llvm::isa<clang::VarDecl>(decl_from_modules)) + { + if (log) + { + log->Printf(" CAS::FEVD[%u] Matching variable found for \"%s\" in the modules", + current_id, + name.GetCString()); + } + + clang::Decl *copied_decl = m_ast_importer->CopyDecl(m_ast_context, &decl_from_modules->getASTContext(), decl_from_modules); + clang::VarDecl *copied_var_decl = copied_decl ? dyn_cast_or_null<clang::VarDecl>(copied_decl) : nullptr; + + if (!copied_var_decl) + { + if (log) + log->Printf(" CAS::FEVD[%u] - Couldn't export a variable declaration from the modules", + current_id); + + break; + } + + context.AddNamedDecl(copied_var_decl); + + context.m_found.variable = true; + } } } while (0); } |