33 lines · c
1// RUN: %clang_cc1 -debug-info-kind=limited -emit-llvm -o - %s | FileCheck %s2 3void t1(void) __attribute__((nodebug));4 5void t1(void)6{7 int a = 10;8 a++;9}10 11void 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: @t119// CHECK-NOT: dbg20// CHECK: }21 22// Verify those things do occur normally.23// CHECK-LABEL: @t224// CHECK: #dbg_declare25// CHECK: !dbg26// 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