clang/test/DebugInfo/Generic/nodebug-attr.c
raw| 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 |
| 8 | __attribute__((nodebug)) void foo(int *a) { |
| 9 | *a = 1; |
| 10 | } |
| 11 | |
| 12 | // CHECK-LABEL: define {{.*}}@bar{{.*}}!dbg |
| 13 | void bar(int *a) { |
| 14 | foo(a); |
| 15 | } |