8
8
# CHECK-SAME: DW_OP_GNU_entry_value(DW_OP_reg22 W22), DW_OP_piece 0x8,
9
9
# CHECK-SAME: DW_OP_GNU_entry_value(DW_OP_reg22 W22), DW_OP_plus_uconst 0x2a, DW_OP_piece 0x8)
10
10
# CHECK-NEXT: DW_AT_name ("fragmented_var")
11
+ # CHECK: DW_TAG_variable
12
+ # CHECK-NEXT: DW_AT_location (DW_OP_piece 0x8, DW_OP_GNU_entry_value(DW_OP_reg22 W22), DW_OP_piece 0x8)
13
+ # CHECK-NEXT: DW_AT_name ("multi_type_fragmented_var")
11
14
12
15
13
16
--- |
14
17
target triple = "aarch64--"
15
18
define void @foo(ptr %unused_arg, ptr swiftasync %async_arg) !dbg !4 {
19
+ %storage = alloca i64
16
20
call void @llvm.dbg.declare(metadata ptr %async_arg, metadata !10, metadata !DIExpression(DW_OP_LLVM_entry_value, 1)), !dbg !12
17
21
; A two fragment variable.
18
22
; Fragments intentionally out of order to ensure the code can handle this.
19
23
call void @llvm.dbg.declare(metadata ptr %async_arg, metadata !10, metadata !DIExpression(DW_OP_LLVM_entry_value, 1, DW_OP_plus_uconst, 42, DW_OP_LLVM_fragment, 64, 64)), !dbg !12
20
24
call void @llvm.dbg.declare(metadata ptr %async_arg, metadata !11, metadata !DIExpression(DW_OP_LLVM_entry_value, 1, DW_OP_LLVM_fragment, 0, 64)), !dbg !12
25
+ ; A fragmented variable mixing entry values and stack slot locations.
26
+ call void @llvm.dbg.declare(metadata ptr %async_arg, metadata !13, metadata !DIExpression(DW_OP_LLVM_entry_value, 1, DW_OP_LLVM_fragment, 64, 64)), !dbg !12
27
+ call void @llvm.dbg.declare(metadata ptr %storage, metadata !13, metadata !DIExpression(DW_OP_LLVM_fragment, 0, 64)), !dbg !12
21
28
ret void, !dbg !12
22
29
}
23
30
declare void @llvm.dbg.declare(metadata, metadata, metadata)
36
43
!10 = !DILocalVariable(name: "a", scope: !4, file: !1, line: 1, type: !7)
37
44
!11 = !DILocalVariable(name: "fragmented_var", scope: !4, file: !1, line: 1, type: !7)
38
45
!12 = !DILocation(line: 1, column: 37, scope: !4)
46
+ !13 = !DILocalVariable(name: "multi_type_fragmented_var", scope: !4, file: !1, line: 1, type: !7)
39
47
...
40
48
---
41
49
name : foo
@@ -45,13 +53,20 @@ liveins:
45
53
stack :
46
54
- { id: 0, name: '', type: spill-slot, offset: -16, size: 8, alignment: 16,
47
55
stack-id : default, callee-saved-register: '$lr', callee-saved-restored: true }
56
+ - { id: 1, name: '', type: default, offset: 0, size: 1, alignment: 8,
57
+ stack-id : default, callee-saved-register: '', callee-saved-restored: true,
58
+ debug-info-variable : ' !13' , debug-info-expression: '!DIExpression(DW_OP_LLVM_fragment, 0, 64)',
59
+ debug-info-location : ' !12' }
60
+
48
61
entry_values :
49
62
- { entry-value-register: '$x22', debug-info-variable: '!10', debug-info-expression: '!DIExpression(DW_OP_LLVM_entry_value, 1, DW_OP_deref)',
50
63
debug-info-location : ' !12' }
51
64
- { entry-value-register: '$x22', debug-info-variable: '!11', debug-info-expression: '!DIExpression(DW_OP_LLVM_entry_value, 1, DW_OP_plus_uconst, 42, DW_OP_deref, DW_OP_LLVM_fragment, 64, 64)',
52
65
debug-info-location : ' !12' }
53
66
- { entry-value-register: '$x22', debug-info-variable: '!11', debug-info-expression: '!DIExpression(DW_OP_LLVM_entry_value, 1, DW_OP_deref, DW_OP_LLVM_fragment, 0, 64)',
54
67
debug-info-location : ' !12' }
68
+ - { entry-value-register: '$x22', debug-info-variable: '!13', debug-info-expression: '!DIExpression(DW_OP_LLVM_entry_value, 1, DW_OP_deref, DW_OP_LLVM_fragment, 64, 64)',
69
+ debug-info-location : ' !12' }
55
70
body : |
56
71
bb.0 (%ir-block.0):
57
72
liveins: $x0, $x22, $lr
0 commit comments