20#include "clang/AST/Decl.h"
22#include "llvm/ADT/StringMap.h"
32 std::shared_ptr<Target> target_sp)
33 : m_target_sp(target_sp) {}
43 uint32_t addr_byte_size) {
45 exe_scope, name, compiler_type, byte_order, addr_byte_size));
50 RemoveVariable(variable);
59 llvm::StringRef name = variable->GetName().GetStringRef();
66 if (name.getAsInteger(10, variable_id))
74std::optional<CompilerType>
82 if (clang::TypeDecl *tdecl = llvm::dyn_cast<clang::TypeDecl>(p.
m_decl)) {
84 const_cast<clang::Type *
>(tdecl->getTypeForDecl()));
92 std::shared_ptr<TypeSystemClang> ctx) {
96 if (clang::EnumDecl *enum_decl = llvm::dyn_cast<clang::EnumDecl>(decl)) {
97 for (clang::EnumConstantDecl *enumerator_decl : enum_decl->enumerators()) {
98 p = {enumerator_decl, ctx};
110std::shared_ptr<ClangASTImporter>
118std::shared_ptr<ClangModulesDeclVendor>
129 llvm::SmallString<64> name;
131 llvm::raw_svector_ostream os(name);
"lldb/Expression/ClangExpressionVariable.h" Encapsulates one variable for the expression parser.
static ClangModulesDeclVendor * Create(Target &target)
void RegisterPersistentDecl(ConstString name, clang::NamedDecl *decl, std::shared_ptr< TypeSystemClang > ctx)
uint32_t m_next_persistent_variable_id
ConstString GetNextPersistentVariableName(bool is_error=false) override
ClangPersistentVariables(std::shared_ptr< Target > target_sp)
std::shared_ptr< ClangModulesDeclVendor > GetClangModulesDeclVendor()
lldb::ExpressionVariableSP CreatePersistentVariable(const lldb::ValueObjectSP &valobj_sp) override
clang::NamedDecl * GetPersistentDecl(ConstString name)
void RemovePersistentVariable(lldb::ExpressionVariableSP variable) override
std::shared_ptr< ClangModulesDeclVendor > m_modules_decl_vendor_sp
PersistentDeclMap m_persistent_decls
Persistent entities declared by the user.
std::shared_ptr< ClangASTImporter > GetClangASTImporter()
std::optional< CompilerType > GetCompilerTypeFromPersistentDecl(ConstString type_name) override
llvm::StringRef GetPersistentVariablePrefix(bool is_error=false) const override
std::shared_ptr< ClangASTImporter > m_ast_importer_sp
std::shared_ptr< Target > m_target_sp
Generic representation of a type in a programming language.
A uniqued constant string class.
const char * GetCString() const
Get the string value as a C string.
"lldb/Target/ExecutionContextScope.h" Inherit from this if your object can reconstruct its execution ...
A class that represents a running process on the host machine.
void * opaque_compiler_type_t
std::shared_ptr< lldb_private::ValueObject > ValueObjectSP
std::shared_ptr< lldb_private::ExpressionVariable > ExpressionVariableSP
ByteOrder
Byte ordering definitions.
clang::NamedDecl * m_decl
The persistent decl.
lldb::TypeSystemWP m_context
The TypeSystemClang for the ASTContext of m_decl.