Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CodeGenCXX / debug-info-structured-binding.cpp
blob7f3c3a08941abce0a4c0d7ae7d8773c5cc152e7e
1 // RUN: %clang_cc1 -emit-llvm -debug-info-kind=standalone -triple %itanium_abi_triple %s -o - | FileCheck %s --implicit-check-not="call void @llvm.dbg.declare"
3 // CHECK: call void @llvm.dbg.declare(metadata ptr %{{[a-z]+}}, metadata ![[VAR_0:[0-9]+]], metadata !DIExpression())
4 // CHECK: call void @llvm.dbg.declare(metadata ptr %{{[0-9]+}}, metadata ![[VAR_1:[0-9]+]], metadata !DIExpression())
5 // CHECK: call void @llvm.dbg.declare(metadata ptr %{{[0-9]+}}, metadata ![[VAR_2:[0-9]+]], metadata !DIExpression(DW_OP_plus_uconst, 4))
6 // CHECK: call void @llvm.dbg.declare(metadata ptr %{{[0-9]+}}, metadata ![[VAR_3:[0-9]+]], metadata !DIExpression(DW_OP_deref))
7 // CHECK: call void @llvm.dbg.declare(metadata ptr %{{[0-9]+}}, metadata ![[VAR_4:[0-9]+]], metadata !DIExpression(DW_OP_deref, DW_OP_plus_uconst, 4))
8 // CHECK: ![[VAR_0]] = !DILocalVariable(name: "a"
9 // CHECK: ![[VAR_1]] = !DILocalVariable(name: "x1"
10 // CHECK: ![[VAR_2]] = !DILocalVariable(name: "y1"
11 // CHECK: ![[VAR_3]] = !DILocalVariable(name: "x2"
12 // CHECK: ![[VAR_4]] = !DILocalVariable(name: "y2"
14 struct A {
15 int x;
16 int y;
19 int f() {
20 A a{10, 20};
21 auto [x1, y1] = a;
22 auto &[x2, y2] = a;
23 return x1 + y1 + x2 + y2;