[Lldb-commits] [lldb] [lldb] Override default struct layout when building register types (PR #189590)

David Spickett via lldb-commits lldb-commits at lists.llvm.org
Fri Apr 17 04:25:10 PDT 2026


DavidSpickett wrote:

> So basically you're creating types whose field orders don't necessarily match the source, and hence you don't want to pollute the existing TypeSystem with those? Yes, that seems like a reasonable use-case for an "isolated AST".

If source can mean debug information/xml elements, yes exactly. If I left it up to clang it would use the ABI and get it wrong.

The isolated type system was my to be able to use `layoutRecordType` without overriding any existing `layoutRecordType` we have for debug information sources.

> Would you ever need to mix types from the "registers AST" with types from the default AST? Might be worth playing around with expressions.

It would be surprising if users couldn't use types from their program at the same time, so yes. I hadn't thought about that.

> We have a ExternalSemaSourceWithPriorities that multiplexes between different AST sources. IIRC it was introduced for the CppModules AST, so it can vend decls with higher priority than the other ASTs. But if one AST can't produce a decl, it falls back to the other AST. Just want to make sure we audited that whole infra (though I may be misremembering that entirely).

This sounds perfect, I can do my custom layout for register types and pass anything else on to the others.

https://github.com/llvm/llvm-project/pull/189590


More information about the lldb-commits mailing list