brintos

brintos / llvm-project-archived public Read only

0
0
Text · 953 B · ead92e6 Raw
31 lines · c
1// RUN: %clang_cc1 -triple x86_64-linux-gnu -gkey-instructions -x c++ -std=c++17 %s -debug-info-kind=line-tables-only -emit-llvm -o - -gno-column-info \2// RUN: | FileCheck %s3// RUN: %clang_cc1 -triple x86_64-linux-gnu -gkey-instructions -x c %s -debug-info-kind=line-tables-only -emit-llvm -o - -gno-column-info \4// RUN: | FileCheck %s5 6// Check the goto branches get Key Instructions metadata.7void ext();8void test_goto(void) {9// CHECK: br label %dst1, !dbg [[G1R1:!.*]]10  goto dst1;11dst1:12  ext();13 14  void *ptr = &&dst2;15// CHECK: br label %indirectgoto, !dbg [[G3R1:!.*]]16  goto *ptr;17dst2:18  ext();19 20// CHECK: br label %dst3, !dbg [[G4R1:!.*]]21  goto *&&dst3;22dst3:23  ext();24 25  return;26}27 28// CHECK: [[G1R1]] = !DILocation(line: 10, scope: ![[#]], atomGroup: 1, atomRank: 1)29// CHECK: [[G3R1]] = !DILocation(line: 16, scope: ![[#]], atomGroup: 3, atomRank: 1)30// CHECK: [[G4R1]] = !DILocation(line: 21, scope: ![[#]], atomGroup: 4, atomRank: 1)31