This revision was automatically updated to reflect the committed changes. Closed by commit rLLDB340585: Reuse the SelectorTable from Clang's Preprocessor (authored by teemperor, committed by ).
Repository: rLLDB LLDB https://reviews.llvm.org/D51185 Files: source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h Index: source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h =================================================================== --- source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h +++ source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h @@ -149,8 +149,6 @@ m_file_manager; ///< The Clang file manager object used by the compiler std::unique_ptr<clang::CompilerInstance> m_compiler; ///< The Clang compiler used to parse expressions into IR - std::unique_ptr<clang::SelectorTable> - m_selector_table; ///< Selector table for Objective-C methods std::unique_ptr<clang::CodeGenerator> m_code_generator; ///< The Clang object that generates IR Index: source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp =================================================================== --- source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp +++ source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp @@ -507,8 +507,6 @@ // 8. Most of this we get from the CompilerInstance, but we also want to give // the context an ExternalASTSource. - m_selector_table.reset(new SelectorTable()); - // We enable all builtin functions beside the builtins from libc/libm (e.g. // 'fopen'). Those libc functions are already correctly handled by LLDB, and // additionally enabling them as expandable builtins is breaking Clang. @@ -522,7 +520,7 @@ std::unique_ptr<clang::ASTContext> ast_context( new ASTContext(m_compiler->getLangOpts(), m_compiler->getSourceManager(), m_compiler->getPreprocessor().getIdentifierTable(), - *m_selector_table.get(), builtin_context)); + PP.getSelectorTable(), builtin_context)); ast_context->InitBuiltinTypes(m_compiler->getTarget());
Index: source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h =================================================================== --- source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h +++ source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h @@ -149,8 +149,6 @@ m_file_manager; ///< The Clang file manager object used by the compiler std::unique_ptr<clang::CompilerInstance> m_compiler; ///< The Clang compiler used to parse expressions into IR - std::unique_ptr<clang::SelectorTable> - m_selector_table; ///< Selector table for Objective-C methods std::unique_ptr<clang::CodeGenerator> m_code_generator; ///< The Clang object that generates IR Index: source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp =================================================================== --- source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp +++ source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp @@ -507,8 +507,6 @@ // 8. Most of this we get from the CompilerInstance, but we also want to give // the context an ExternalASTSource. - m_selector_table.reset(new SelectorTable()); - // We enable all builtin functions beside the builtins from libc/libm (e.g. // 'fopen'). Those libc functions are already correctly handled by LLDB, and // additionally enabling them as expandable builtins is breaking Clang. @@ -522,7 +520,7 @@ std::unique_ptr<clang::ASTContext> ast_context( new ASTContext(m_compiler->getLangOpts(), m_compiler->getSourceManager(), m_compiler->getPreprocessor().getIdentifierTable(), - *m_selector_table.get(), builtin_context)); + PP.getSelectorTable(), builtin_context)); ast_context->InitBuiltinTypes(m_compiler->getTarget());
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits