[OpenACC] Enable 'attach' clause for combined constructs
[llvm-project.git] / clang / test / CodeGen / debug-info-no-inline-line-tables.c
blobf6c19fde2e5a93dad185db6801ac89a971405e61
1 // RUN: %clang_cc1 -triple x86_64-windows-msvc -debug-info-kind=limited \
2 // RUN: -gno-inline-line-tables -emit-llvm -o - %s | FileCheck %s
3 // RUN: %clang -gno-inline-line-tables -S -emit-llvm -o - %s | FileCheck %s \
4 // RUN: -check-prefix=INLINE-FLAG
5 // RUN: %clang -S -emit-llvm -o - %s | FileCheck %s -check-prefix=NO-FLAG
7 int x;
8 __attribute((always_inline)) void f(void) {
9 x += 1;
11 int main(void) {
12 f();
13 x += 2;
14 return x;
17 // Check that clang emits the location of the call site and not the inlined
18 // function in the debug info.
19 // CHECK: define dso_local i32 @main()
20 // CHECK: %{{.+}} = load i32, ptr @x, align 4, !dbg [[DbgLoc:![0-9]+]]
22 // Check that the no-inline-line-tables attribute is added.
23 // CHECK: attributes #0 = {{.*}}"no-inline-line-tables"{{.*}}
24 // CHECK: attributes #1 = {{.*}}"no-inline-line-tables"{{.*}}
26 // CHECK: [[DbgLoc]] = !DILocation(line: 12,
27 // CHECK-NOT: inlinedAt:
29 // INLINE-FLAG: attributes #0 = {{.*}}"no-inline-line-tables"{{.*}}
30 // INLINE-FLAG: attributes #1 = {{.*}}"no-inline-line-tables"{{.*}}
31 // NO-FLAG-NOT: "no-inline-line-tables"