clang/test/DebugInfo/Generic/label.c
raw| 1 | // This test will test the correstness of generating DILabel and |
| 2 | // llvm.dbg.label for labels. |
| 3 | // |
| 4 | // RUN: %clang_cc1 %s -o - -emit-llvm -debug-info-kind=limited | FileCheck %s |
| 5 | |
| 6 | int f1(int a, int b) { |
| 7 | int sum; |
| 8 | |
| 9 | top: |
| 10 | // CHECK: #dbg_label([[LABEL_METADATA:!.*]], [[LABEL_LOCATION:![0-9]+]] |
| 11 | sum = a + b; |
| 12 | return sum; |
| 13 | } |
| 14 | |
| 15 | // CHECK: [[LABEL_METADATA]] = !DILabel({{.*}}, name: "top", {{.*}}, line: 9, column: 1) |
| 16 | // CHECK: [[LABEL_LOCATION]] = !DILocation(line: 9, |