diff options
Diffstat (limited to 'clang/test/DebugInfo/CXX/structured-binding.cpp')
| -rw-r--r-- | clang/test/DebugInfo/CXX/structured-binding.cpp | 44 |
1 files changed, 43 insertions, 1 deletions
diff --git a/clang/test/DebugInfo/CXX/structured-binding.cpp b/clang/test/DebugInfo/CXX/structured-binding.cpp index 5fbd54c16382..8032ce85c9e2 100644 --- a/clang/test/DebugInfo/CXX/structured-binding.cpp +++ b/clang/test/DebugInfo/CXX/structured-binding.cpp @@ -7,6 +7,12 @@ // CHECK: #dbg_declare(ptr %{{[0-9]+}}, ![[VAR_4:[0-9]+]], !DIExpression(DW_OP_deref, DW_OP_plus_uconst, 4), // CHECK: #dbg_declare(ptr %z1, ![[VAR_5:[0-9]+]], !DIExpression() // CHECK: #dbg_declare(ptr %z2, ![[VAR_6:[0-9]+]], !DIExpression() +// CHECK: getelementptr inbounds nuw %struct.A, ptr {{.*}}, i32 0, i32 1, !dbg ![[Y1_DEBUG_LOC:[0-9]+]] +// CHECK: getelementptr inbounds nuw %struct.A, ptr {{.*}}, i32 0, i32 1, !dbg ![[Y2_DEBUG_LOC:[0-9]+]] +// CHECK: load ptr, ptr %z2, {{.*}}!dbg ![[Z2_DEBUG_LOC:[0-9]+]] +// CHECK: getelementptr inbounds [2 x i32], ptr {{.*}}, i{{64|32}} 0, i{{64|32}} 1, !dbg ![[A2_DEBUG_LOC:[0-9]+]] +// CHECK: getelementptr inbounds nuw { i32, i32 }, ptr {{.*}}, i32 0, i32 1, !dbg ![[C2_DEBUG_LOC:[0-9]+]] +// CHECK: extractelement <2 x i32> {{.*}}, i32 1, !dbg ![[V2_DEBUG_LOC:[0-9]+]] // CHECK: ![[VAR_0]] = !DILocalVariable(name: "a" // CHECK: ![[VAR_1]] = !DILocalVariable(name: "x1", scope: !{{[0-9]+}}, file: !{{[0-9]+}}, line: {{[0-9]+}}, type: !{{[0-9]+}}) // CHECK: ![[VAR_2]] = !DILocalVariable(name: "y1", scope: !{{[0-9]+}}, file: !{{[0-9]+}}, line: {{[0-9]+}}, type: !{{[0-9]+}}) @@ -46,5 +52,41 @@ int f() { auto [x1, y1] = a; auto &[x2, y2] = a; auto [z1, z2] = B{1, 2}; - return x1 + y1 + x2 + y2 + z1 + z2; + int array[2] = {3, 4}; + auto &[a1, a2] = array; + _Complex int cmplx = {1, 2}; + auto &[c1, c2] = cmplx; + int vctr __attribute__ ((vector_size (sizeof(int)*2)))= {1, 2}; + auto &[v1, v2] = vctr; + return // + x1 // + + // +// CHECK: ![[Y1_DEBUG_LOC]] = !DILocation(line: [[@LINE+1]] + y1 // + + // + x2 // + + // +// CHECK: ![[Y2_DEBUG_LOC]] = !DILocation(line: [[@LINE+1]] + y2 // + + // + z1 // + + // +// CHECK: ![[Z2_DEBUG_LOC]] = !DILocation(line: [[@LINE+1]] + z2 // + + // + a1 // + + // +// CHECK: ![[A2_DEBUG_LOC]] = !DILocation(line: [[@LINE+1]] + a2 // + + // + c1 // + + // +// CHECK: ![[C2_DEBUG_LOC]] = !DILocation(line: [[@LINE+1]] + c2 // + + // + v1 // + + // +// CHECK: ![[V2_DEBUG_LOC]] = !DILocation(line: [[@LINE+1]] + v2 // + ; } |
