Revert "Reapply "[llvm-jitlink] Use concurrent linking by default." with fixes. ...
[llvm-project.git] / clang / test / CodeGen / debug-label-inline.c
blob972a32b5af32d8bde348973448aaa8ba398ccfe4
1 // This test will test the correctness of generating DILabel and
2 // llvm.dbg.label when the label is in inlined functions.
3 //
4 // RUN: %clang_cc1 -O2 %s -o - -emit-llvm -debug-info-kind=limited | FileCheck %s
5 inline int f1(int a, int b) {
6 int sum;
8 top:
9 sum = a + b;
10 return sum;
13 extern int ga, gb;
15 int f2(void) {
16 int result;
18 result = f1(ga, gb);
19 // CHECK: #dbg_label([[LABEL_METADATA:!.*]], [[LABEL_LOCATION:![0-9]+]]
21 return result;
24 // CHECK: distinct !DISubprogram(name: "f1", {{.*}}, retainedNodes: [[ELEMENTS:!.*]])
25 // CHECK: [[ELEMENTS]] = !{{{.*}}, [[LABEL_METADATA]]}
26 // CHECK: [[LABEL_METADATA]] = !DILabel({{.*}}, name: "top", {{.*}}, line: 8)
27 // CHECK: [[INLINEDAT:!.*]] = distinct !DILocation(line: 18,
28 // CHECK: [[LABEL_LOCATION]] = !DILocation(line: 8, {{.*}}, inlinedAt: [[INLINEDAT]])