9#ifndef LLDB_SOURCE_PLUGINS_EXPRESSIONPARSER_CLANG_CLANGEXPRESSIONPARSER_H
10#define LLDB_SOURCE_PLUGINS_EXPRESSIONPARSER_CLANG_CLANGEXPRESSIONPARSER_H
27class CodeCompleteConsumer;
28class CompilerInstance;
67 bool generate_debug_info,
68 std::vector<std::string> include_directories = {},
69 std::string filename =
"<clang expression>");
75 unsigned typed_pos)
override;
118 lldb::IRExecutionUnitSP &execution_unit_sp,
166 clang::CodeCompleteConsumer *completion =
nullptr,
167 unsigned completion_line = 0,
168 unsigned completion_column = 0);
170 std::unique_ptr<llvm::LLVMContext>
172 std::unique_ptr<clang::CompilerInstance>
174 std::unique_ptr<clang::CodeGenerator>
An architecture specification class.
"lldb/Expression/ClangExpressionParser.h" Encapsulates an instance of Clang that can parse expression...
std::string m_filename
File name used for the user expression.
bool RewriteExpression(DiagnosticManager &diagnostic_manager) override
Try to use the FixIts in the diagnostic_manager to rewrite the expression.
unsigned ParseInternal(DiagnosticManager &diagnostic_manager, clang::CodeCompleteConsumer *completion=nullptr, unsigned completion_line=0, unsigned completion_column=0)
Parses the expression.
Status PrepareForExecution(lldb::addr_t &func_addr, lldb::addr_t &func_end, lldb::IRExecutionUnitSP &execution_unit_sp, ExecutionContext &exe_ctx, bool &can_interpret, lldb_private::ExecutionPolicy execution_policy) override
Ready an already-parsed expression for execution, possibly evaluating it statically.
std::unique_ptr< clang::CompilerInstance > m_compiler
The Clang compiler used to parse expressions into IR.
unsigned Parse(DiagnosticManager &diagnostic_manager)
Parse a single expression and convert it to IR using Clang.
~ClangExpressionParser() override
Destructor.
std::unique_ptr< llvm::LLVMContext > m_llvm_context
The LLVM context to generate IR into.
std::string GetClangTargetABI(const ArchSpec &target_arch)
Returns a string representing current ABI.
Status RunStaticInitializers(lldb::IRExecutionUnitSP &execution_unit_sp, ExecutionContext &exe_ctx)
Run all static initializers for an execution unit.
std::unique_ptr< clang::CodeGenerator > m_code_generator
The Clang object that generates IR.
LLDBPreprocessorCallbacks * m_pp_callbacks
Called when the preprocessor encounters module imports.
std::vector< std::string > m_include_directories
std::shared_ptr< TypeSystemClang > m_ast_context
"lldb/Utility/ArgCompletionRequest.h"
"lldb/Target/ExecutionContextScope.h" Inherit from this if your object can reconstruct its execution ...
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
"lldb/Expression/ExpressionParser.h" Encapsulates an instance of a compiler that can parse expression...
Encapsulates a single expression for use in lldb.
A class that represents a running process on the host machine.
ExecutionPolicy
Expression execution policies.