| 1 |
// RUN: %clang_cc1 -triple x86_64-linux-gnu -gkey-instructions -gno-column-info -x c++ %s -debug-info-kind=line-tables-only -emit-llvm -o - \ |
| 2 |
// RUN: | FileCheck %s --implicit-check-not atomGroup --implicit-check-not atomRank |
| 3 |
|
| 4 |
// RUN: %clang_cc1 -triple x86_64-linux-gnu -gkey-instructions -gno-column-info -x c %s -debug-info-kind=line-tables-only -emit-llvm -o - \ |
| 5 |
// RUN: | FileCheck %s --implicit-check-not atomGroup --implicit-check-not atomRank |
| 6 |
|
| 7 |
typedef struct { |
| 8 |
struct{} a; |
| 9 |
double b; |
| 10 |
} s1; |
| 11 |
|
| 12 |
s1 f(int z, ...) { |
| 13 |
__builtin_va_list list; |
| 14 |
__builtin_va_start(list, z); |
| 15 |
// CHECK: vaarg.end: |
| 16 |
// CHECK-NEXT: %vaarg.addr = phi ptr |
| 17 |
// CHECK-NEXT: call void @llvm.memcpy{{.*}}, !dbg [[G1R1:!.*]] |
| 18 |
// CHECK-NEXT: {{.*}} = getelementptr{{.*}} |
| 19 |
// CHECK-NEXT: [[LOAD:%.*]] = load double{{.*}}, !dbg [[G1R2:!.*]] |
| 20 |
// CHECK-NEXT: ret double [[LOAD]], !dbg [[G1R1]] |
| 21 |
return __builtin_va_arg(list, s1); |
| 22 |
} |
| 23 |
|
| 24 |
// CHECK: [[G1R1]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 1) |
| 25 |
// CHECK: [[G1R2]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 2) |