================ @@ -402,4 +404,120 @@ Interpreter::Visit(const BitFieldExtractionNode *node) { return child_valobj_sp; } +static lldb::TypeSystemSP GetTypeSystemFromCU(std::shared_ptr<StackFrame> ctx) { + SymbolContext symbol_context = + ctx->GetSymbolContext(lldb::eSymbolContextCompUnit); + lldb::LanguageType language = symbol_context.comp_unit->GetLanguage(); + + symbol_context = ctx->GetSymbolContext(lldb::eSymbolContextModule); + llvm::Expected<lldb::TypeSystemSP> type_system = + symbol_context.module_sp->GetTypeSystemForLanguage(language); + + if (type_system) + return *type_system; + + return lldb::TypeSystemSP(); +} + +static CompilerType GetBasicType(lldb::TypeSystemSP type_system, + lldb::BasicType basic_type) { + if (type_system) + if (auto compiler_type = type_system.get()->GetBasicTypeFromAST(basic_type)) + return compiler_type; + + CompilerType empty_type; + return empty_type; +} + +llvm::Expected<CompilerType> +Interpreter::PickLiteralType(lldb::TypeSystemSP type_system, ---------------- labath wrote:
That could be fine too, but I think that what you have here is pretty good as well. I don't see a reason to change it. https://github.com/llvm/llvm-project/pull/152308 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits