GetUniqueNamespaceDeclaration(const char *name, clang::DeclContext *decl_ctx,
bool is_inline = false);
- static clang::NamespaceDecl *
- GetUniqueNamespaceDeclaration(clang::ASTContext *ast, const char *name,
- clang::DeclContext *decl_ctx,
- bool is_inline = false);
-
// Function Types
clang::FunctionDecl *
: CompilerDeclContext();
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());
- if (ast) {
+ ClangASTContext *map_ast =
+ ClangASTContext::GetASTContext(m_ast_context);
+ if (frame_ast && map_ast) {
clang::NamespaceDecl *namespace_decl =
- ClangASTContext::GetUniqueNamespaceDeclaration(
- m_ast_context, name.GetCString(), nullptr);
+ map_ast->GetUniqueNamespaceDeclaration(name.GetCString(),
+ nullptr);
if (namespace_decl) {
context.AddNamedDecl(namespace_decl);
clang::DeclContext *clang_decl_ctx =
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 *
ClangASTContext::CreateBlockDeclaration(clang::DeclContext *ctx) {
if (ctx != nullptr) {