Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CodeGen / attr-nodebug.c
blobfde0c912b16dce5ee42aa8f1f822e3398b763036
1 // RUN: %clang_cc1 -debug-info-kind=limited -emit-llvm -o - %s | FileCheck %s
3 void t1(void) __attribute__((nodebug));
5 void t1(void)
7 int a = 10;
8 a++;
11 void t2(void)
13 int b = 10;
14 b++;
17 // With nodebug, IR should have no llvm.dbg.* calls, or !dbg annotations.
18 // CHECK-LABEL: @t1
19 // CHECK-NOT: dbg
20 // CHECK: }
22 // Verify those things do occur normally.
23 // CHECK-LABEL: @t2
24 // CHECK: call{{.*}}llvm.dbg
25 // CHECK: !dbg
26 // CHECK: }
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"