[Lldb-commits] [lldb] [lldb] Introduce RegisterType base class for all register type classes (PR #196960)
David Spickett via lldb-commits
lldb-commits at lists.llvm.org
Thu Jun 4 02:47:47 PDT 2026
================
@@ -22,9 +22,10 @@
using namespace lldb;
template <typename T>
-static void dump_type_value(lldb_private::CompilerType &fields_type, T value,
+static void dump_type_value(const lldb_private::RegisterFlags &flags_type,
+ lldb_private::CompilerType &fields_compiler_type,
----------------
DavidSpickett wrote:
`RegisterTypeBuilderClang` builds the type on demand. That plugin is created the first time you call `Target::GetRegisterType`, and the plugin creates the type in the target's scratch AST.
(at least it does right now, I was experimenting with a separate AST for https://github.com/llvm/llvm-project/pull/189590 but I'm not sure if we need it)
There is code in the type builder that looks in the AST for existing types of the same "mangled" name we would use for the requested type (`RegisterTypeBuilderClang::GetRegisterType`). So yes, you could do the same thing by keeping a handle to the generated CompilerType I think.
https://github.com/llvm/llvm-project/pull/196960
More information about the lldb-commits
mailing list