Debian Codegraph @

clang/test/DebugInfo/KeyInstructions/init-scalar.c

raw
1 // RUN: %clang_cc1 -triple x86_64-linux-gnu -gkey-instructions -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 -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 void a() {
8 // CHECK: store i32 0, ptr %A{{.*}}, !dbg [[G1R1:!.*]]
9 int A = 0;
10 // CHECK: %add = add {{.*}}, !dbg [[G2R2:!.*]]
11 // CHECK: store i32 %add, ptr %B, align 4, !dbg [[G2R1:!.*]]
12 int B = 2 * A + 1;
13 // CHECK: ret{{.*}}, !dbg [[RET:!.*]]
14 }
15
16 // CHECK: [[G1R1]] = !DILocation({{.*}}, atomGroup: 1, atomRank: 1)
17 // CHECK: [[G2R2]] = !DILocation({{.*}}, atomGroup: 2, atomRank: 2)
18 // CHECK: [[G2R1]] = !DILocation({{.*}}, atomGroup: 2, atomRank: 1)
19 // CHECK: [[RET]] = !DILocation({{.*}}, atomGroup: 3, atomRank: 1)