[RFC] Dynamic sizes and field offsets in DWARF

In Objective-C, for example, the offsets of instance variables in an object are not (necessarily) known at compile time, and LLDB knows that and ignores the offsets, which results in DWARF like this:

$ cat /tmp/t.m                           
@interface Foo {
int i, j;
};
@end;
Foo *foo;
$ dwarfdump /tmp/t.o --name Foo --show-children
/tmp/t.o:	file format Mach-O arm64

0x00000031: DW_TAG_structure_type
              DW_AT_name	("Foo")
              DW_AT_byte_size	(0x08)
              DW_AT_decl_file	("/tmp/t.m")
              DW_AT_decl_line	(1)
              DW_AT_APPLE_runtime_class	(DW_LANG_ObjC)

0x00000037:   DW_TAG_member
                DW_AT_name	("i")
                DW_AT_type	(0x0000004c "int")
                DW_AT_decl_file	("/tmp/t.m")
                DW_AT_decl_line	(2)
                DW_AT_data_member_location	(0x00)
                DW_AT_accessibility	(DW_ACCESS_protected)

0x00000041:   DW_TAG_member
                DW_AT_name	("j")
                DW_AT_type	(0x0000004c "int")
                DW_AT_decl_file	("/tmp/t.m")
                DW_AT_decl_line	(2)
                DW_AT_data_member_location	(0x00)
                DW_AT_accessibility	(DW_ACCESS_protected)

0x0000004b:   NULL

It would be nice to have the option to not emit a data member location or to emit an expression for it (I don’t think we could produce one for Objective-C; we need to ask the runtime, but maybe you can for Ada).