forked from OSchip/llvm-project
[lldb][NFC] Remove ClangASTContext::GetUniqueNamespaceDeclaration overload
This overload is only used in one place and having static overloads for all methods that only do an additional clang::ASTContext -> ClangASTContext conversion is just not sustainable.
This commit is contained in:
parent
52c5014da0
commit
6640f2e7d4
|
@ -344,11 +344,6 @@ public:
|
||||||
GetUniqueNamespaceDeclaration(const char *name, clang::DeclContext *decl_ctx,
|
GetUniqueNamespaceDeclaration(const char *name, clang::DeclContext *decl_ctx,
|
||||||
bool is_inline = false);
|
bool is_inline = false);
|
||||||
|
|
||||||
static clang::NamespaceDecl *
|
|
||||||
GetUniqueNamespaceDeclaration(clang::ASTContext *ast, const char *name,
|
|
||||||
clang::DeclContext *decl_ctx,
|
|
||||||
bool is_inline = false);
|
|
||||||
|
|
||||||
// Function Types
|
// Function Types
|
||||||
|
|
||||||
clang::FunctionDecl *
|
clang::FunctionDecl *
|
||||||
|
|
|
@ -1101,13 +1101,15 @@ void ClangExpressionDeclMap::FindExternalVisibleDecls(
|
||||||
: CompilerDeclContext();
|
: CompilerDeclContext();
|
||||||
|
|
||||||
if (frame_decl_context) {
|
if (frame_decl_context) {
|
||||||
ClangASTContext *ast = llvm::dyn_cast_or_null<ClangASTContext>(
|
ClangASTContext *frame_ast = llvm::dyn_cast_or_null<ClangASTContext>(
|
||||||
frame_decl_context.GetTypeSystem());
|
frame_decl_context.GetTypeSystem());
|
||||||
|
|
||||||
if (ast) {
|
ClangASTContext *map_ast =
|
||||||
|
ClangASTContext::GetASTContext(m_ast_context);
|
||||||
|
if (frame_ast && map_ast) {
|
||||||
clang::NamespaceDecl *namespace_decl =
|
clang::NamespaceDecl *namespace_decl =
|
||||||
ClangASTContext::GetUniqueNamespaceDeclaration(
|
map_ast->GetUniqueNamespaceDeclaration(name.GetCString(),
|
||||||
m_ast_context, name.GetCString(), nullptr);
|
nullptr);
|
||||||
if (namespace_decl) {
|
if (namespace_decl) {
|
||||||
context.AddNamedDecl(namespace_decl);
|
context.AddNamedDecl(namespace_decl);
|
||||||
clang::DeclContext *clang_decl_ctx =
|
clang::DeclContext *clang_decl_ctx =
|
||||||
|
|
|
@ -1861,16 +1861,6 @@ NamespaceDecl *ClangASTContext::GetUniqueNamespaceDeclaration(
|
||||||
return namespace_decl;
|
return namespace_decl;
|
||||||
}
|
}
|
||||||
|
|
||||||
NamespaceDecl *ClangASTContext::GetUniqueNamespaceDeclaration(
|
|
||||||
clang::ASTContext *ast, const char *name, clang::DeclContext *decl_ctx,
|
|
||||||
bool is_inline) {
|
|
||||||
ClangASTContext *ast_ctx = ClangASTContext::GetASTContext(ast);
|
|
||||||
if (ast_ctx == nullptr)
|
|
||||||
return nullptr;
|
|
||||||
|
|
||||||
return ast_ctx->GetUniqueNamespaceDeclaration(name, decl_ctx, is_inline);
|
|
||||||
}
|
|
||||||
|
|
||||||
clang::BlockDecl *
|
clang::BlockDecl *
|
||||||
ClangASTContext::CreateBlockDeclaration(clang::DeclContext *ctx) {
|
ClangASTContext::CreateBlockDeclaration(clang::DeclContext *ctx) {
|
||||||
if (ctx != nullptr) {
|
if (ctx != nullptr) {
|
||||||
|
|
Loading…
Reference in New Issue