[Lldb-commits] [lldb] 2e03324 - [lldb][NFC] Remove forward declaration for non-existent type clang::Action and delete references to it

Raphael Isemann via lldb-commits lldb-commits at lists.llvm.org
Fri Jan 3 02:27:49 PST 2020


Author: Raphael Isemann
Date: 2020-01-03T11:24:16+01:00
New Revision: 2e033244417c1b9947ee28795568bc33a1efe781

URL: https://github.com/llvm/llvm-project/commit/2e033244417c1b9947ee28795568bc33a1efe781
DIFF: https://github.com/llvm/llvm-project/commit/2e033244417c1b9947ee28795568bc33a1efe781.diff

LOG: [lldb][NFC] Remove forward declaration for non-existent type clang::Action and delete references to it

There is no clang::Action anymore so our forward decl for it and the obsolete pointer in the
ASTStructExtractor can both go (that code anyway didn't do anything).

Added: 
    

Modified: 
    lldb/include/lldb/Core/ClangForward.h
    lldb/source/Plugins/ExpressionParser/Clang/ASTStructExtractor.cpp
    lldb/source/Plugins/ExpressionParser/Clang/ASTStructExtractor.h

Removed: 
    


################################################################################
diff  --git a/lldb/include/lldb/Core/ClangForward.h b/lldb/include/lldb/Core/ClangForward.h
index 6b24b47c8a96..0bc331438e5c 100644
--- a/lldb/include/lldb/Core/ClangForward.h
+++ b/lldb/include/lldb/Core/ClangForward.h
@@ -17,7 +17,6 @@ namespace Builtin {
 class Context;
 }
 
-class Action;
 class ASTConsumer;
 class ASTContext;
 class ASTRecordLayout;

diff  --git a/lldb/source/Plugins/ExpressionParser/Clang/ASTStructExtractor.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ASTStructExtractor.cpp
index 190eacaa2b62..a164d48ae3e0 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/ASTStructExtractor.cpp
+++ b/lldb/source/Plugins/ExpressionParser/Clang/ASTStructExtractor.cpp
@@ -30,8 +30,8 @@ ASTStructExtractor::ASTStructExtractor(ASTConsumer *passthrough,
                                        const char *struct_name,
                                        ClangFunctionCaller &function)
     : m_ast_context(nullptr), m_passthrough(passthrough),
-      m_passthrough_sema(nullptr), m_sema(nullptr), m_action(nullptr),
-      m_function(function), m_struct_name(struct_name) {
+      m_passthrough_sema(nullptr), m_sema(nullptr), m_function(function),
+      m_struct_name(struct_name) {
   if (!m_passthrough)
     return;
 
@@ -170,7 +170,6 @@ void ASTStructExtractor::PrintStats() {
 
 void ASTStructExtractor::InitializeSema(Sema &S) {
   m_sema = &S;
-  m_action = reinterpret_cast<Action *>(m_sema);
 
   if (m_passthrough_sema)
     m_passthrough_sema->InitializeSema(S);
@@ -178,7 +177,6 @@ void ASTStructExtractor::InitializeSema(Sema &S) {
 
 void ASTStructExtractor::ForgetSema() {
   m_sema = nullptr;
-  m_action = nullptr;
 
   if (m_passthrough_sema)
     m_passthrough_sema->ForgetSema();

diff  --git a/lldb/source/Plugins/ExpressionParser/Clang/ASTStructExtractor.h b/lldb/source/Plugins/ExpressionParser/Clang/ASTStructExtractor.h
index 7aef2e254e1f..078cf095975f 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/ASTStructExtractor.h
+++ b/lldb/source/Plugins/ExpressionParser/Clang/ASTStructExtractor.h
@@ -121,8 +121,6 @@ class ASTStructExtractor : public clang::SemaConsumer {
                                            ///for passthrough.  NULL if it's an
                                            ///ASTConsumer.
   clang::Sema *m_sema;                     ///< The Sema to use.
-  clang::Action
-      *m_action; ///< The Sema to use, cast to an Action so it's usable.
 
   ClangFunctionCaller &m_function; ///< The function to populate with
                                    ///information about the argument structure.


        


More information about the lldb-commits mailing list