xref: /llvm-project/clang/test/CodeGen/nodebug-attr.c (revision fd739804e0591468762eb87488a497a3f7d4afb0)
1 // RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-llvm %s -O3 \
2 // RUN:   -debug-info-kind=limited -o - -debugger-tuning=gdb -dwarf-version=4 \
3 // RUN:   | FileCheck %s
4 
5 // Makes sure there is no !dbg between function attributes and '{'.
6 // CHECK-LABEL: define{{.*}} void @foo{{.*}} #{{[0-9]+}} {
7 // CHECK-NOT: ret {{.*}}!dbg
foo(int * a)8 __attribute__((nodebug)) void foo(int *a) {
9   *a = 1;
10 }
11 
12 // CHECK-LABEL: define {{.*}}@bar{{.*}}!dbg
bar(int * a)13 void bar(int *a) {
14   foo(a);
15 }
16