Skip to content

Commit c0092dd

Browse files
committed
[upstreaming] Remove duplicate ClangASTContext constructor
Now we also call the right constructor from ClangASTContext
1 parent 3ba13de commit c0092dd

File tree

2 files changed

+1
-12
lines changed

2 files changed

+1
-12
lines changed

lldb/include/lldb/Symbol/ClangASTContext.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,6 @@ class ClangASTContext : public TypeSystem {
5454
// Constructors and Destructors
5555
ClangASTContext(const char *triple = nullptr);
5656

57-
ClangASTContext(clang::ASTContext *ast_ctx);
58-
5957
~ClangASTContext() override;
6058

6159
void Finalize() override;

lldb/source/Symbol/ClangASTContext.cpp

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -533,15 +533,6 @@ ClangASTContext::ClangASTContext(const char *target_triple)
533533
SetTargetTriple(target_triple);
534534
}
535535

536-
ClangASTContext::ClangASTContext(clang::ASTContext *ast_ctx)
537-
: TypeSystem(TypeSystem::eKindClang), m_target_triple(), m_ast_up(ast_ctx),
538-
m_language_options_up(), m_source_manager_up(), m_diagnostics_engine_up(),
539-
m_target_options_rp(), m_target_info_up(), m_identifier_table_up(),
540-
m_selector_table_up(), m_builtins_up(), m_callback_tag_decl(nullptr),
541-
m_callback_objc_decl(nullptr), m_callback_baton(nullptr),
542-
m_pointer_byte_size(0), m_ast_owned(false) {}
543-
544-
//----------------------------------------------------------------------
545536
// Destructor
546537
ClangASTContext::~ClangASTContext() { Finalize(); }
547538

@@ -766,7 +757,7 @@ ASTContext *ClangASTContext::getASTContext() {
766757
ClangASTContext *ClangASTContext::GetASTContext(clang::ASTContext *ast) {
767758
ClangASTContext *clang_ast = GetASTMap().Lookup(ast);
768759
if (!clang_ast)
769-
clang_ast = new ClangASTContext(ast);
760+
clang_ast = new ClangASTContext(*ast);
770761
return clang_ast;
771762
}
772763

0 commit comments

Comments
 (0)