Skip to content

Commit 2bb7720

Browse files
authored
fix: do not generate debug information for variables outside of compilation unit (#1486)
1 parent 48b22af commit 2bb7720

5 files changed

+132
-153
lines changed

compiler/plc_driver/src/tests/multi_files.rs

Lines changed: 54 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -168,35 +168,35 @@ fn forward_declared_constant_is_also_marked_constant() {
168168
%foo = type { i16 }
169169
%mainProg = type { i16 }
170170
171-
@__foo__init = external unnamed_addr constant %foo, !dbg !0
172-
@mainProg_instance = external global %mainProg, !dbg !8
171+
@__foo__init = external unnamed_addr constant %foo
172+
@mainProg_instance = external global %mainProg
173173
174-
define i16 @main() !dbg !18 {
174+
define i16 @main() !dbg !4 {
175175
entry:
176176
%main = alloca i16, align 2
177177
%f = alloca %foo, align 8
178-
call void @llvm.dbg.declare(metadata %foo* %f, metadata !23, metadata !DIExpression()), !dbg !24
178+
call void @llvm.dbg.declare(metadata %foo* %f, metadata !9, metadata !DIExpression()), !dbg !15
179179
%0 = bitcast %foo* %f to i8*
180180
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %0, i8* align 1 bitcast (%foo* @__foo__init to i8*), i64 ptrtoint (%foo* getelementptr (%foo, %foo* null, i32 1) to i64), i1 false)
181-
call void @llvm.dbg.declare(metadata i16* %main, metadata !25, metadata !DIExpression()), !dbg !26
181+
call void @llvm.dbg.declare(metadata i16* %main, metadata !16, metadata !DIExpression()), !dbg !17
182182
store i16 0, i16* %main, align 2
183-
call void @__init_foo(%foo* %f), !dbg !27
184-
call void @__user_init_foo(%foo* %f), !dbg !27
185-
%something_to_initialize = getelementptr inbounds %foo, %foo* %f, i32 0, i32 0, !dbg !27
186-
%load_something_to_initialize = load i16, i16* %something_to_initialize, align 2, !dbg !27
187-
store i16 %load_something_to_initialize, i16* getelementptr inbounds (%mainProg, %mainProg* @mainProg_instance, i32 0, i32 0), align 2, !dbg !27
188-
call void @mainProg(%mainProg* @mainProg_instance), !dbg !28
189-
%main_ret = load i16, i16* %main, align 2, !dbg !29
190-
ret i16 %main_ret, !dbg !29
183+
call void @__init_foo(%foo* %f), !dbg !18
184+
call void @__user_init_foo(%foo* %f), !dbg !18
185+
%something_to_initialize = getelementptr inbounds %foo, %foo* %f, i32 0, i32 0, !dbg !18
186+
%load_something_to_initialize = load i16, i16* %something_to_initialize, align 2, !dbg !18
187+
store i16 %load_something_to_initialize, i16* getelementptr inbounds (%mainProg, %mainProg* @mainProg_instance, i32 0, i32 0), align 2, !dbg !18
188+
call void @mainProg(%mainProg* @mainProg_instance), !dbg !19
189+
%main_ret = load i16, i16* %main, align 2, !dbg !20
190+
ret i16 %main_ret, !dbg !20
191191
}
192192
193-
declare !dbg !30 void @foo(%foo*)
193+
declare !dbg !21 void @foo(%foo*)
194194
195195
declare void @__init_foo(%foo*)
196196
197-
declare !dbg !33 void @__user_init_foo(%foo*)
197+
declare !dbg !24 void @__user_init_foo(%foo*)
198198
199-
declare !dbg !38 void @mainProg(%mainProg*)
199+
declare !dbg !29 void @mainProg(%mainProg*)
200200
201201
; Function Attrs: nofree nosync nounwind readnone speculatable willreturn
202202
declare void @llvm.dbg.declare(metadata, metadata, metadata) #0
@@ -207,50 +207,44 @@ fn forward_declared_constant_is_also_marked_constant() {
207207
attributes #0 = { nofree nosync nounwind readnone speculatable willreturn }
208208
attributes #1 = { argmemonly nofree nounwind willreturn }
209209
210-
!llvm.module.flags = !{!13, !14}
211-
!llvm.dbg.cu = !{!15}
212-
213-
!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
214-
!1 = distinct !DIGlobalVariable(name: "__foo__init", scope: !2, file: !2, line: 12, type: !3, isLocal: false, isDefinition: true)
215-
!2 = !DIFile(filename: "external_file2.st", directory: "")
216-
!3 = !DIDerivedType(tag: DW_TAG_const_type, baseType: !4)
217-
!4 = !DICompositeType(tag: DW_TAG_structure_type, name: "foo", scope: !2, file: !2, line: 12, size: 16, align: 64, flags: DIFlagPublic, elements: !5, identifier: "foo")
218-
!5 = !{!6}
219-
!6 = !DIDerivedType(tag: DW_TAG_member, name: "something_to_initialize", scope: !2, file: !2, line: 14, baseType: !7, size: 16, align: 16, flags: DIFlagPublic)
220-
!7 = !DIBasicType(name: "INT", size: 16, encoding: DW_ATE_signed, flags: DIFlagPublic)
221-
!8 = !DIGlobalVariableExpression(var: !9, expr: !DIExpression())
222-
!9 = distinct !DIGlobalVariable(name: "mainProg", scope: !2, file: !2, line: 6, type: !10, isLocal: false, isDefinition: true)
223-
!10 = !DICompositeType(tag: DW_TAG_structure_type, name: "mainProg", scope: !2, file: !2, line: 6, size: 16, align: 64, flags: DIFlagPublic, elements: !11, identifier: "mainProg")
224-
!11 = !{!12}
225-
!12 = !DIDerivedType(tag: DW_TAG_member, name: "a", scope: !2, file: !2, line: 8, baseType: !7, size: 16, align: 16, flags: DIFlagPublic)
226-
!13 = !{i32 2, !"Dwarf Version", i32 5}
227-
!14 = !{i32 2, !"Debug Info Version", i32 3}
228-
!15 = distinct !DICompileUnit(language: DW_LANG_C, file: !16, producer: "RuSTy Structured text Compiler", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, globals: !17, splitDebugInlining: false)
229-
!16 = !DIFile(filename: "external_file1.st", directory: "root")
230-
!17 = !{!0, !8}
231-
!18 = distinct !DISubprogram(name: "main", linkageName: "main", scope: !19, file: !19, line: 2, type: !20, scopeLine: 2, flags: DIFlagPublic, spFlags: DISPFlagDefinition, unit: !15, retainedNodes: !22)
232-
!19 = !DIFile(filename: "external_file1.st", directory: "")
233-
!20 = !DISubroutineType(flags: DIFlagPublic, types: !21)
234-
!21 = !{null}
235-
!22 = !{}
236-
!23 = !DILocalVariable(name: "f", scope: !18, file: !19, line: 4, type: !4, align: 64)
237-
!24 = !DILocation(line: 4, column: 8, scope: !18)
238-
!25 = !DILocalVariable(name: "main", scope: !18, file: !19, line: 2, type: !7, align: 16)
239-
!26 = !DILocation(line: 2, column: 13, scope: !18)
240-
!27 = !DILocation(line: 0, scope: !18)
241-
!28 = !DILocation(line: 6, column: 8, scope: !18)
242-
!29 = !DILocation(line: 7, column: 4, scope: !18)
243-
!30 = distinct !DISubprogram(name: "foo", linkageName: "foo", scope: !2, file: !2, line: 12, type: !31, scopeLine: 16, flags: DIFlagPublic, spFlags: DISPFlagDefinition, unit: !15, retainedNodes: !22)
244-
!31 = !DISubroutineType(flags: DIFlagPublic, types: !32)
245-
!32 = !{null, !4}
246-
!33 = distinct !DISubprogram(name: "__user_init_foo", linkageName: "__user_init_foo", scope: !34, file: !34, type: !35, scopeLine: 1, flags: DIFlagPublic, spFlags: DISPFlagDefinition, unit: !15, retainedNodes: !22)
247-
!34 = !DIFile(filename: "__initializers", directory: "")
248-
!35 = !DISubroutineType(flags: DIFlagPublic, types: !36)
249-
!36 = !{null, !37}
250-
!37 = !DIDerivedType(tag: DW_TAG_pointer_type, name: "__auto_pointer_to_foo", baseType: !4, size: 64, align: 64, dwarfAddressSpace: 1)
251-
!38 = distinct !DISubprogram(name: "mainProg", linkageName: "mainProg", scope: !2, file: !2, line: 6, type: !39, scopeLine: 10, flags: DIFlagPublic, spFlags: DISPFlagDefinition, unit: !15, retainedNodes: !22)
252-
!39 = !DISubroutineType(flags: DIFlagPublic, types: !40)
253-
!40 = !{null, !10, !7}
210+
!llvm.module.flags = !{!0, !1}
211+
!llvm.dbg.cu = !{!2}
212+
213+
!0 = !{i32 2, !"Dwarf Version", i32 5}
214+
!1 = !{i32 2, !"Debug Info Version", i32 3}
215+
!2 = distinct !DICompileUnit(language: DW_LANG_C, file: !3, producer: "RuSTy Structured text Compiler", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false)
216+
!3 = !DIFile(filename: "external_file1.st", directory: "root")
217+
!4 = distinct !DISubprogram(name: "main", linkageName: "main", scope: !5, file: !5, line: 2, type: !6, scopeLine: 2, flags: DIFlagPublic, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8)
218+
!5 = !DIFile(filename: "external_file1.st", directory: "")
219+
!6 = !DISubroutineType(flags: DIFlagPublic, types: !7)
220+
!7 = !{null}
221+
!8 = !{}
222+
!9 = !DILocalVariable(name: "f", scope: !4, file: !5, line: 4, type: !10, align: 64)
223+
!10 = !DICompositeType(tag: DW_TAG_structure_type, name: "foo", scope: !11, file: !11, line: 12, size: 16, align: 64, flags: DIFlagPublic, elements: !12, identifier: "foo")
224+
!11 = !DIFile(filename: "external_file2.st", directory: "")
225+
!12 = !{!13}
226+
!13 = !DIDerivedType(tag: DW_TAG_member, name: "something_to_initialize", scope: !11, file: !11, line: 14, baseType: !14, size: 16, align: 16, flags: DIFlagPublic)
227+
!14 = !DIBasicType(name: "INT", size: 16, encoding: DW_ATE_signed, flags: DIFlagPublic)
228+
!15 = !DILocation(line: 4, column: 8, scope: !4)
229+
!16 = !DILocalVariable(name: "main", scope: !4, file: !5, line: 2, type: !14, align: 16)
230+
!17 = !DILocation(line: 2, column: 13, scope: !4)
231+
!18 = !DILocation(line: 0, scope: !4)
232+
!19 = !DILocation(line: 6, column: 8, scope: !4)
233+
!20 = !DILocation(line: 7, column: 4, scope: !4)
234+
!21 = distinct !DISubprogram(name: "foo", linkageName: "foo", scope: !11, file: !11, line: 12, type: !22, scopeLine: 16, flags: DIFlagPublic, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8)
235+
!22 = !DISubroutineType(flags: DIFlagPublic, types: !23)
236+
!23 = !{null, !10}
237+
!24 = distinct !DISubprogram(name: "__user_init_foo", linkageName: "__user_init_foo", scope: !25, file: !25, type: !26, scopeLine: 1, flags: DIFlagPublic, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8)
238+
!25 = !DIFile(filename: "__initializers", directory: "")
239+
!26 = !DISubroutineType(flags: DIFlagPublic, types: !27)
240+
!27 = !{null, !28}
241+
!28 = !DIDerivedType(tag: DW_TAG_pointer_type, name: "__auto_pointer_to_foo", baseType: !10, size: 64, align: 64, dwarfAddressSpace: 1)
242+
!29 = distinct !DISubprogram(name: "mainProg", linkageName: "mainProg", scope: !11, file: !11, line: 6, type: !30, scopeLine: 10, flags: DIFlagPublic, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8)
243+
!30 = !DISubroutineType(flags: DIFlagPublic, types: !31)
244+
!31 = !{null, !32, !14}
245+
!32 = !DICompositeType(tag: DW_TAG_structure_type, name: "mainProg", scope: !11, file: !11, line: 6, size: 16, align: 64, flags: DIFlagPublic, elements: !33, identifier: "mainProg")
246+
!33 = !{!34}
247+
!34 = !DIDerivedType(tag: DW_TAG_member, name: "a", scope: !11, file: !11, line: 8, baseType: !14, size: 16, align: 16, flags: DIFlagPublic)
254248
255249
; ModuleID = 'external_file2.st'
256250
source_filename = "external_file2.st"

compiler/plc_driver/src/tests/snapshots/plc_driver__tests__multi_files__multiple_files_in_different_locations_with_debug_info.snap

Lines changed: 30 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
2-
source: compiler/plc_driver/./src/tests/multi_files.rs
2+
source: compiler/plc_driver/src/tests/multi_files.rs
33
expression: "results.join(\"\\n\")"
4-
snapshot_kind: text
54
---
65
; ModuleID = 'app/file1.st'
76
source_filename = "app/file1.st"
@@ -10,50 +9,47 @@ target triple = "[filtered]"
109

1110
%mainProg = type {}
1211

13-
@mainProg_instance = external global %mainProg, !dbg !0
12+
@mainProg_instance = external global %mainProg
1413

15-
define i16 @main() !dbg !10 {
14+
define i16 @main() !dbg !4 {
1615
entry:
1716
%main = alloca i16, align 2
18-
call void @llvm.dbg.declare(metadata i16* %main, metadata !14, metadata !DIExpression()), !dbg !16
17+
call void @llvm.dbg.declare(metadata i16* %main, metadata !9, metadata !DIExpression()), !dbg !11
1918
store i16 0, i16* %main, align 2
20-
call void @mainProg(%mainProg* @mainProg_instance), !dbg !17
21-
%main_ret = load i16, i16* %main, align 2, !dbg !18
22-
ret i16 %main_ret, !dbg !18
19+
call void @mainProg(%mainProg* @mainProg_instance), !dbg !12
20+
%main_ret = load i16, i16* %main, align 2, !dbg !13
21+
ret i16 %main_ret, !dbg !13
2322
}
2423

25-
declare !dbg !19 void @mainProg(%mainProg*)
24+
declare !dbg !14 void @mainProg(%mainProg*)
2625

2726
; Function Attrs: nofree nosync nounwind readnone speculatable willreturn
2827
declare void @llvm.dbg.declare(metadata, metadata, metadata) #0
2928

3029
attributes #0 = { nofree nosync nounwind readnone speculatable willreturn }
3130

32-
!llvm.module.flags = !{!5, !6}
33-
!llvm.dbg.cu = !{!7}
34-
35-
!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
36-
!1 = distinct !DIGlobalVariable(name: "mainProg", scope: !2, file: !2, line: 2, type: !3, isLocal: false, isDefinition: true)
37-
!2 = !DIFile(filename: "file2.st", directory: "lib")
38-
!3 = !DICompositeType(tag: DW_TAG_structure_type, name: "mainProg", scope: !2, file: !2, line: 2, align: 64, flags: DIFlagPublic, elements: !4, identifier: "mainProg")
39-
!4 = !{}
40-
!5 = !{i32 2, !"Dwarf Version", i32 5}
41-
!6 = !{i32 2, !"Debug Info Version", i32 3}
42-
!7 = distinct !DICompileUnit(language: DW_LANG_C, file: !8, producer: "RuSTy Structured text Compiler", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, globals: !9, splitDebugInlining: false)
43-
!8 = !DIFile(filename: "app/file1.st", directory: "root")
44-
!9 = !{!0}
45-
!10 = distinct !DISubprogram(name: "main", linkageName: "main", scope: !11, file: !11, line: 2, type: !12, scopeLine: 10, flags: DIFlagPublic, spFlags: DISPFlagDefinition, unit: !7, retainedNodes: !4)
46-
!11 = !DIFile(filename: "file1.st", directory: "app")
47-
!12 = !DISubroutineType(flags: DIFlagPublic, types: !13)
48-
!13 = !{null}
49-
!14 = !DILocalVariable(name: "main", scope: !10, file: !11, line: 2, type: !15, align: 16)
50-
!15 = !DIBasicType(name: "INT", size: 16, encoding: DW_ATE_signed, flags: DIFlagPublic)
51-
!16 = !DILocation(line: 2, column: 13, scope: !10)
52-
!17 = !DILocation(line: 10, column: 4, scope: !10)
53-
!18 = !DILocation(line: 11, column: 4, scope: !10)
54-
!19 = distinct !DISubprogram(name: "mainProg", linkageName: "mainProg", scope: !2, file: !2, line: 2, type: !20, scopeLine: 5, flags: DIFlagPublic, spFlags: DISPFlagDefinition, unit: !7, retainedNodes: !4)
55-
!20 = !DISubroutineType(flags: DIFlagPublic, types: !21)
56-
!21 = !{null, !3}
31+
!llvm.module.flags = !{!0, !1}
32+
!llvm.dbg.cu = !{!2}
33+
34+
!0 = !{i32 2, !"Dwarf Version", i32 5}
35+
!1 = !{i32 2, !"Debug Info Version", i32 3}
36+
!2 = distinct !DICompileUnit(language: DW_LANG_C, file: !3, producer: "RuSTy Structured text Compiler", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false)
37+
!3 = !DIFile(filename: "app/file1.st", directory: "root")
38+
!4 = distinct !DISubprogram(name: "main", linkageName: "main", scope: !5, file: !5, line: 2, type: !6, scopeLine: 10, flags: DIFlagPublic, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8)
39+
!5 = !DIFile(filename: "file1.st", directory: "app")
40+
!6 = !DISubroutineType(flags: DIFlagPublic, types: !7)
41+
!7 = !{null}
42+
!8 = !{}
43+
!9 = !DILocalVariable(name: "main", scope: !4, file: !5, line: 2, type: !10, align: 16)
44+
!10 = !DIBasicType(name: "INT", size: 16, encoding: DW_ATE_signed, flags: DIFlagPublic)
45+
!11 = !DILocation(line: 2, column: 13, scope: !4)
46+
!12 = !DILocation(line: 10, column: 4, scope: !4)
47+
!13 = !DILocation(line: 11, column: 4, scope: !4)
48+
!14 = distinct !DISubprogram(name: "mainProg", linkageName: "mainProg", scope: !15, file: !15, line: 2, type: !16, scopeLine: 5, flags: DIFlagPublic, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8)
49+
!15 = !DIFile(filename: "file2.st", directory: "lib")
50+
!16 = !DISubroutineType(flags: DIFlagPublic, types: !17)
51+
!17 = !{null, !18}
52+
!18 = !DICompositeType(tag: DW_TAG_structure_type, name: "mainProg", scope: !15, file: !15, line: 2, align: 64, flags: DIFlagPublic, elements: !8, identifier: "mainProg")
5753

5854
; ModuleID = 'lib/file2.st'
5955
source_filename = "lib/file2.st"

compiler/plc_driver/src/tests/snapshots/plc_driver__tests__multi_files__multiple_files_with_debug_info.snap

Lines changed: 30 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
2-
source: compiler/plc_driver/./src/tests/multi_files.rs
2+
source: compiler/plc_driver/src/tests/multi_files.rs
33
expression: "results.join(\"\\n\")"
4-
snapshot_kind: text
54
---
65
; ModuleID = 'file1.st'
76
source_filename = "file1.st"
@@ -10,50 +9,47 @@ target triple = "[filtered]"
109

1110
%mainProg = type {}
1211

13-
@mainProg_instance = external global %mainProg, !dbg !0
12+
@mainProg_instance = external global %mainProg
1413

15-
define i16 @main() !dbg !10 {
14+
define i16 @main() !dbg !4 {
1615
entry:
1716
%main = alloca i16, align 2
18-
call void @llvm.dbg.declare(metadata i16* %main, metadata !14, metadata !DIExpression()), !dbg !16
17+
call void @llvm.dbg.declare(metadata i16* %main, metadata !9, metadata !DIExpression()), !dbg !11
1918
store i16 0, i16* %main, align 2
20-
call void @mainProg(%mainProg* @mainProg_instance), !dbg !17
21-
%main_ret = load i16, i16* %main, align 2, !dbg !18
22-
ret i16 %main_ret, !dbg !18
19+
call void @mainProg(%mainProg* @mainProg_instance), !dbg !12
20+
%main_ret = load i16, i16* %main, align 2, !dbg !13
21+
ret i16 %main_ret, !dbg !13
2322
}
2423

25-
declare !dbg !19 void @mainProg(%mainProg*)
24+
declare !dbg !14 void @mainProg(%mainProg*)
2625

2726
; Function Attrs: nofree nosync nounwind readnone speculatable willreturn
2827
declare void @llvm.dbg.declare(metadata, metadata, metadata) #0
2928

3029
attributes #0 = { nofree nosync nounwind readnone speculatable willreturn }
3130

32-
!llvm.module.flags = !{!5, !6}
33-
!llvm.dbg.cu = !{!7}
34-
35-
!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
36-
!1 = distinct !DIGlobalVariable(name: "mainProg", scope: !2, file: !2, line: 2, type: !3, isLocal: false, isDefinition: true)
37-
!2 = !DIFile(filename: "file2.st", directory: "")
38-
!3 = !DICompositeType(tag: DW_TAG_structure_type, name: "mainProg", scope: !2, file: !2, line: 2, align: 64, flags: DIFlagPublic, elements: !4, identifier: "mainProg")
39-
!4 = !{}
40-
!5 = !{i32 2, !"Dwarf Version", i32 5}
41-
!6 = !{i32 2, !"Debug Info Version", i32 3}
42-
!7 = distinct !DICompileUnit(language: DW_LANG_C, file: !8, producer: "RuSTy Structured text Compiler", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, globals: !9, splitDebugInlining: false)
43-
!8 = !DIFile(filename: "file1.st", directory: "root")
44-
!9 = !{!0}
45-
!10 = distinct !DISubprogram(name: "main", linkageName: "main", scope: !11, file: !11, line: 2, type: !12, scopeLine: 10, flags: DIFlagPublic, spFlags: DISPFlagDefinition, unit: !7, retainedNodes: !4)
46-
!11 = !DIFile(filename: "file1.st", directory: "")
47-
!12 = !DISubroutineType(flags: DIFlagPublic, types: !13)
48-
!13 = !{null}
49-
!14 = !DILocalVariable(name: "main", scope: !10, file: !11, line: 2, type: !15, align: 16)
50-
!15 = !DIBasicType(name: "INT", size: 16, encoding: DW_ATE_signed, flags: DIFlagPublic)
51-
!16 = !DILocation(line: 2, column: 13, scope: !10)
52-
!17 = !DILocation(line: 10, column: 4, scope: !10)
53-
!18 = !DILocation(line: 11, column: 4, scope: !10)
54-
!19 = distinct !DISubprogram(name: "mainProg", linkageName: "mainProg", scope: !2, file: !2, line: 2, type: !20, scopeLine: 5, flags: DIFlagPublic, spFlags: DISPFlagDefinition, unit: !7, retainedNodes: !4)
55-
!20 = !DISubroutineType(flags: DIFlagPublic, types: !21)
56-
!21 = !{null, !3}
31+
!llvm.module.flags = !{!0, !1}
32+
!llvm.dbg.cu = !{!2}
33+
34+
!0 = !{i32 2, !"Dwarf Version", i32 5}
35+
!1 = !{i32 2, !"Debug Info Version", i32 3}
36+
!2 = distinct !DICompileUnit(language: DW_LANG_C, file: !3, producer: "RuSTy Structured text Compiler", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false)
37+
!3 = !DIFile(filename: "file1.st", directory: "root")
38+
!4 = distinct !DISubprogram(name: "main", linkageName: "main", scope: !5, file: !5, line: 2, type: !6, scopeLine: 10, flags: DIFlagPublic, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8)
39+
!5 = !DIFile(filename: "file1.st", directory: "")
40+
!6 = !DISubroutineType(flags: DIFlagPublic, types: !7)
41+
!7 = !{null}
42+
!8 = !{}
43+
!9 = !DILocalVariable(name: "main", scope: !4, file: !5, line: 2, type: !10, align: 16)
44+
!10 = !DIBasicType(name: "INT", size: 16, encoding: DW_ATE_signed, flags: DIFlagPublic)
45+
!11 = !DILocation(line: 2, column: 13, scope: !4)
46+
!12 = !DILocation(line: 10, column: 4, scope: !4)
47+
!13 = !DILocation(line: 11, column: 4, scope: !4)
48+
!14 = distinct !DISubprogram(name: "mainProg", linkageName: "mainProg", scope: !15, file: !15, line: 2, type: !16, scopeLine: 5, flags: DIFlagPublic, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !8)
49+
!15 = !DIFile(filename: "file2.st", directory: "")
50+
!16 = !DISubroutineType(flags: DIFlagPublic, types: !17)
51+
!17 = !{null, !18}
52+
!18 = !DICompositeType(tag: DW_TAG_structure_type, name: "mainProg", scope: !15, file: !15, line: 2, align: 64, flags: DIFlagPublic, elements: !8, identifier: "mainProg")
5753

5854
; ModuleID = 'file2.st'
5955
source_filename = "file2.st"

0 commit comments

Comments
 (0)