| 1 |
// RUN: %clang_cc1 -gkey-instructions -gno-column-info -x c++ %s -debug-info-kind=line-tables-only -emit-llvm -o - -triple x86_64-windows-msvc \ |
| 2 |
// RUN: | FileCheck %s --implicit-check-not atomGroup --implicit-check-not atomRank |
| 3 |
|
| 4 |
// RUN: %clang_cc1 -gkey-instructions -gno-column-info -x c %s -debug-info-kind=line-tables-only -emit-llvm -o - -triple x86_64-windows-msvc \ |
| 5 |
// RUN: | FileCheck %s --implicit-check-not atomGroup --implicit-check-not atomRank |
| 6 |
|
| 7 |
typedef struct { int *p; } Ptr; |
| 8 |
Ptr getPtr(); |
| 9 |
void f() { |
| 10 |
// CHECK: %call = call i64{{.*}}, !dbg [[G1R3:!.*]] |
| 11 |
// CHECK: [[gep:%.*]] = getelementptr inbounds nuw %struct.Ptr, ptr %p, i32 0, i32 0 |
| 12 |
// CHECK: [[i2p:%.*]] = inttoptr i64 %call to ptr, !dbg [[G1R2:!.*]] |
| 13 |
// CHECK: store ptr [[i2p]], ptr [[gep]], align 8, !dbg [[G1R1:!.*]] |
| 14 |
Ptr p = getPtr(); |
| 15 |
// CHECK: ret{{.*}}, !dbg [[RET:!.*]] |
| 16 |
} |
| 17 |
|
| 18 |
// CHECK: [[G1R3]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 3) |
| 19 |
// CHECK: [[G1R2]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 2) |
| 20 |
// CHECK: [[G1R1]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 1) |
| 21 |
// CHECK: [[RET]] = !DILocation({{.*}}, atomGroup: 2, atomRank: 1) |