summaryrefslogtreecommitdiffstats
path: root/lldb/source/Symbol
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Symbol')
-rw-r--r--lldb/source/Symbol/ClangASTContext.cpp19
-rw-r--r--lldb/source/Symbol/CompilerDeclContext.cpp5
-rw-r--r--lldb/source/Symbol/TypeSystem.cpp4
3 files changed, 24 insertions, 4 deletions
diff --git a/lldb/source/Symbol/ClangASTContext.cpp b/lldb/source/Symbol/ClangASTContext.cpp
index 0fc1a94876b..f953ddb21e4 100644
--- a/lldb/source/Symbol/ClangASTContext.cpp
+++ b/lldb/source/Symbol/ClangASTContext.cpp
@@ -1885,6 +1885,17 @@ ClangASTContext::GetUniqueNamespaceDeclaration (const char *name, DeclContext *d
return namespace_decl;
}
+NamespaceDecl *
+ClangASTContext::GetUniqueNamespaceDeclaration (clang::ASTContext *ast,
+ const char *name,
+ clang::DeclContext *decl_ctx)
+{
+ ClangASTContext *ast_ctx = ClangASTContext::GetASTContext(ast);
+ if (ast_ctx == nullptr)
+ return nullptr;
+
+ return ast_ctx->GetUniqueNamespaceDeclaration(name, decl_ctx);
+}
clang::BlockDecl *
ClangASTContext::CreateBlockDeclaration (clang::DeclContext *ctx)
@@ -9781,7 +9792,9 @@ ClangASTContext::DeclGetFunctionArgumentType (void *opaque_decl, size_t idx)
//----------------------------------------------------------------------
std::vector<CompilerDecl>
-ClangASTContext::DeclContextFindDeclByName(void *opaque_decl_ctx, ConstString name)
+ClangASTContext::DeclContextFindDeclByName(void *opaque_decl_ctx,
+ ConstString name,
+ const bool ignore_using_decls)
{
std::vector<CompilerDecl> found_decls;
if (opaque_decl_ctx)
@@ -9805,12 +9818,16 @@ ClangASTContext::DeclContextFindDeclByName(void *opaque_decl_ctx, ConstString na
{
if (clang::UsingDirectiveDecl *ud = llvm::dyn_cast<clang::UsingDirectiveDecl>(child))
{
+ if (ignore_using_decls)
+ continue;
clang::DeclContext *from = ud->getCommonAncestor();
if (searched.find(ud->getNominatedNamespace()) == searched.end())
search_queue.insert(std::make_pair(from, ud->getNominatedNamespace()));
}
else if (clang::UsingDecl *ud = llvm::dyn_cast<clang::UsingDecl>(child))
{
+ if (ignore_using_decls)
+ continue;
for (clang::UsingShadowDecl *usd : ud->shadows())
{
clang::Decl *target = usd->getTargetDecl();
diff --git a/lldb/source/Symbol/CompilerDeclContext.cpp b/lldb/source/Symbol/CompilerDeclContext.cpp
index 8bee1b48753..10a70d97f23 100644
--- a/lldb/source/Symbol/CompilerDeclContext.cpp
+++ b/lldb/source/Symbol/CompilerDeclContext.cpp
@@ -15,10 +15,11 @@
using namespace lldb_private;
std::vector<CompilerDecl>
-CompilerDeclContext::FindDeclByName (ConstString name)
+CompilerDeclContext::FindDeclByName (ConstString name, const bool ignore_using_decls)
{
if (IsValid())
- return m_type_system->DeclContextFindDeclByName(m_opaque_decl_ctx, name);
+ return m_type_system->DeclContextFindDeclByName(
+ m_opaque_decl_ctx, name, ignore_using_decls);
else
return std::vector<CompilerDecl>();
}
diff --git a/lldb/source/Symbol/TypeSystem.cpp b/lldb/source/Symbol/TypeSystem.cpp
index 5c2ab5cceab..5b8e935c71d 100644
--- a/lldb/source/Symbol/TypeSystem.cpp
+++ b/lldb/source/Symbol/TypeSystem.cpp
@@ -153,7 +153,9 @@ TypeSystem::DeclGetFunctionArgumentType (void *opaque_decl, size_t arg_idx)
std::vector<CompilerDecl>
-TypeSystem::DeclContextFindDeclByName (void *opaque_decl_ctx, ConstString name)
+TypeSystem::DeclContextFindDeclByName (void *opaque_decl_ctx,
+ ConstString name,
+ bool ignore_imported_decls)
{
return std::vector<CompilerDecl>();
}
OpenPOWER on IntegriCloud