Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CodeGen / debug-label.c
blob20efa49b0a4c469ed66afadad13b4f4aab4ca63b
1 // This test will test the correstness of generating DILabel and
2 // llvm.dbg.label for labels.
3 //
4 // RUN: %clang_cc1 -emit-llvm %s -o - -emit-llvm -debug-info-kind=limited | FileCheck %s
6 int f1(int a, int b) {
7 int sum;
9 top:
10 // CHECK: call void @llvm.dbg.label(metadata [[LABEL_METADATA:!.*]]), !dbg [[LABEL_LOCATION:!.*]]
11 sum = a + b;
12 return sum;
15 // CHECK: [[LABEL_METADATA]] = !DILabel({{.*}}, name: "top", {{.*}}, line: 9)
16 // CHECK: [[LABEL_LOCATION]] = !DILocation(line: 9,