xref: /aosp_15_r20/external/clang/test/CodeGen/2010-07-08-DeclDebugLineNo.c (revision 67e74705e28f6214e480b399dd47ea732279e315)
1*67e74705SXin Li // RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s
2*67e74705SXin Li // Insure that dbg.declare lines for locals refer to correct line number records.
3*67e74705SXin Li // Radar 8152866.
foo()4*67e74705SXin Li void foo() {
5*67e74705SXin Li   int l = 0;    // line #4: CHECK: {{call.*llvm.dbg.declare.*%l.*\!dbg }}[[variable_l:![0-9]+]]
6*67e74705SXin Li   int p = 0;    // line #5: CHECK: {{call.*llvm.dbg.declare.*%p.*\!dbg }}[[variable_p:![0-9]+]]
7*67e74705SXin Li }
8*67e74705SXin Li // Now match the line number records:
9*67e74705SXin Li // CHECK: {{^}}[[variable_l]] = !DILocation(line: 5,
10*67e74705SXin Li // CHECK: {{^}}[[variable_p]] = !DILocation(line: 6,
11