1 // RUN: %clang_cc1 -debug-info-kind=limited -emit-llvm -o - %s | FileCheck %s
2
3 void t1(void) __attribute__((nodebug));
4
t1(void)5 void t1(void)
6 {
7 int a = 10;
8 a++;
9 }
10
t2(void)11 void t2(void)
12 {
13 int b = 10;
14 b++;
15 }
16
17 // With nodebug, IR should have no llvm.dbg.* calls, or !dbg annotations.
18 // CHECK-LABEL: @t1
19 // CHECK-NOT: dbg
20 // CHECK: }
21
22 // Verify those things do occur normally.
23 // CHECK-LABEL: @t2
24 // CHECK: #dbg_declare
25 // CHECK: !dbg
26 // CHECK: }
27
28 // We should see a function description for t2 but not t1.
29 // CHECK-NOT: DISubprogram(name: "t1"
30 // CHECK: DISubprogram(name: "t2"
31 // CHECK-NOT: DISubprogram(name: "t1"
32
33