9#ifndef LLDB_SOURCE_PLUGINS_EXPRESSIONPARSER_CLANG_ASTRESULTSYNTHESIZER_H
10#define LLDB_SOURCE_PLUGINS_EXPRESSIONPARSER_CLANG_ASTRESULTSYNTHESIZER_H
13#include "clang/Sema/SemaConsumer.h"
65 void Initialize(clang::ASTContext &Context)
override;
"lldb/Expression/ASTResultSynthesizer.h" Adds a result variable declaration to the ASTs for an expres...
clang::ASTContext * m_ast_context
The AST context to use for identifiers and types.
clang::ASTConsumer * m_passthrough
The ASTConsumer down the chain, for passthrough.
clang::SemaConsumer * m_passthrough_sema
The SemaConsumer down the chain, for passthrough.
void CommitPersistentDecls()
The parse has succeeded, so record its persistent decls.
void RecordPersistentTypes(clang::DeclContext *FunDeclCtx)
Given a DeclContext for a function or method, find all types declared in the context and record any p...
void RecordPersistentDecl(clang::NamedDecl *D)
Given a NamedDecl, register it as a pointer type in the target's scratch AST context.
bool SynthesizeBodyResult(clang::CompoundStmt *Body, clang::DeclContext *DC)
Process a function body and produce the result variable and initialization.
bool SynthesizeFunctionResult(clang::FunctionDecl *FunDecl)
Process a function and produce the result variable and initialization.
Target & m_target
The target, which contains the persistent variable store and the.
~ASTResultSynthesizer() override
Destructor.
void HandleTagDeclDefinition(clang::TagDecl *D) override
Passthrough stub.
void InitializeSema(clang::Sema &S) override
Set the Sema object to use when performing transforms, and pass it on.
void TransformTopLevelDecl(clang::Decl *D)
Hunt the given Decl for FunctionDecls named $__lldb_expr, recursing as necessary through LinkageSpecD...
bool SynthesizeObjCMethodResult(clang::ObjCMethodDecl *MethodDecl)
Process an Objective-C method and produce the result variable and initialization.
bool HandleTopLevelDecl(clang::DeclGroupRef D) override
Examine a list of Decls to find the function $__lldb_expr and transform its code.
std::vector< clang::NamedDecl * > m_decls
Persistent declarations to register assuming the expression succeeds.
void CompleteTentativeDefinition(clang::VarDecl *D) override
Passthrough stub.
void HandleVTable(clang::CXXRecordDecl *RD) override
Passthrough stub.
void HandleTranslationUnit(clang::ASTContext &Ctx) override
Passthrough stub.
void ForgetSema() override
Reset the Sema to NULL now that transformations are done.
void PrintStats() override
Passthrough stub.
void Initialize(clang::ASTContext &Context) override
Link this consumer with a particular AST context.
void MaybeRecordPersistentType(clang::TypeDecl *D)
Given a TypeDecl, if it declares a type whose name starts with a dollar sign, register it as a pointe...
clang::Sema * m_sema
The Sema to use.
A class that represents a running process on the host machine.