Skip to content

Commit 2e03324

Browse files
committed
[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).
1 parent 1711f88 commit 2e03324

File tree

3 files changed

+2
-7
lines changed

3 files changed

+2
-7
lines changed

lldb/include/lldb/Core/ClangForward.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ namespace Builtin {
1717
class Context;
1818
}
1919

20-
class Action;
2120
class ASTConsumer;
2221
class ASTContext;
2322
class ASTRecordLayout;

lldb/source/Plugins/ExpressionParser/Clang/ASTStructExtractor.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ ASTStructExtractor::ASTStructExtractor(ASTConsumer *passthrough,
3030
const char *struct_name,
3131
ClangFunctionCaller &function)
3232
: m_ast_context(nullptr), m_passthrough(passthrough),
33-
m_passthrough_sema(nullptr), m_sema(nullptr), m_action(nullptr),
34-
m_function(function), m_struct_name(struct_name) {
33+
m_passthrough_sema(nullptr), m_sema(nullptr), m_function(function),
34+
m_struct_name(struct_name) {
3535
if (!m_passthrough)
3636
return;
3737

@@ -170,15 +170,13 @@ void ASTStructExtractor::PrintStats() {
170170

171171
void ASTStructExtractor::InitializeSema(Sema &S) {
172172
m_sema = &S;
173-
m_action = reinterpret_cast<Action *>(m_sema);
174173

175174
if (m_passthrough_sema)
176175
m_passthrough_sema->InitializeSema(S);
177176
}
178177

179178
void ASTStructExtractor::ForgetSema() {
180179
m_sema = nullptr;
181-
m_action = nullptr;
182180

183181
if (m_passthrough_sema)
184182
m_passthrough_sema->ForgetSema();

lldb/source/Plugins/ExpressionParser/Clang/ASTStructExtractor.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,6 @@ class ASTStructExtractor : public clang::SemaConsumer {
121121
///for passthrough. NULL if it's an
122122
///ASTConsumer.
123123
clang::Sema *m_sema; ///< The Sema to use.
124-
clang::Action
125-
*m_action; ///< The Sema to use, cast to an Action so it's usable.
126124

127125
ClangFunctionCaller &m_function; ///< The function to populate with
128126
///information about the argument structure.

0 commit comments

Comments
 (0)