[Lldb-commits] [PATCH] D51185: Reuse the SelectorTable from Clang's Preprocessor

Raphael Isemann via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Aug 23 15:41:49 PDT 2018


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());
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51185.162284.patch
Type: text/x-patch
Size: 1828 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20180823/ddc11e16/attachment.bin>


More information about the lldb-commits mailing list