brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · f6c19fd Raw
32 lines · c
1// RUN: %clang_cc1 -triple x86_64-windows-msvc -debug-info-kind=limited \2// RUN:   -gno-inline-line-tables -emit-llvm -o - %s | FileCheck %s3// RUN: %clang -gno-inline-line-tables -S -emit-llvm -o - %s | FileCheck %s \4// RUN:   -check-prefix=INLINE-FLAG5// RUN: %clang -S -emit-llvm -o - %s | FileCheck %s -check-prefix=NO-FLAG6 7int x;8__attribute((always_inline)) void f(void) {9  x += 1;10}11int main(void) {12  f();13  x += 2;14  return x;15}16 17// Check that clang emits the location of the call site and not the inlined18// function in the debug info.19// CHECK: define dso_local i32 @main()20// CHECK: %{{.+}} = load i32, ptr @x, align 4, !dbg [[DbgLoc:![0-9]+]]21 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"{{.*}}25 26// CHECK: [[DbgLoc]] = !DILocation(line: 12,27// CHECK-NOT:  inlinedAt:28 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"32