struct Foo {
int x;
};
Void bar() {
struct Foo f;
f.x = 1;
}
!12 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "Foo", file: !8, line: 1, size: 32, flags: DIFlagTypePassByValue, elements: !13, identifier: "abc")
!14 = !DIDerivedType(tag: DW_TAG_member, name: "x", scope: !12, file: !8, line: 2, baseType: !15, size: 32)
!15 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
Trying to extract line 1 for Struct Foo and line 2 for member variable x from Function or Module handle.
question from:
https://stackoverflow.com/questions/65928179/how-to-get-dicompositetype-line-numbers-from-llvm-ir-code 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…