xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGen/debug-info-scope-file.c (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 -g -emit-llvm < %s | FileCheck %s
2*0a6a1f1dSLionel Sambuc 
3*0a6a1f1dSLionel Sambuc // Check that, just because we emitted a function from a different file doesn't
4*0a6a1f1dSLionel Sambuc // mean we insert a file-change inside the next function.
5*0a6a1f1dSLionel Sambuc 
6*0a6a1f1dSLionel Sambuc // CHECK: ret void, !dbg [[F1_LINE:![0-9]*]]
7*0a6a1f1dSLionel Sambuc // CHECK: ret void, !dbg [[F2_LINE:![0-9]*]]
8*0a6a1f1dSLionel Sambuc // CHECK: [[F1:![0-9]*]] = {{.*}} ; [ DW_TAG_subprogram ] {{.*}} [def] [f1]
9*0a6a1f1dSLionel Sambuc // CHECK: [[F2:![0-9]*]] = {{.*}} ; [ DW_TAG_subprogram ] {{.*}} [def] [f2]
10*0a6a1f1dSLionel Sambuc // CHECK: [[F1_LINE]] = !MDLocation({{.*}}, scope: [[F1]])
11*0a6a1f1dSLionel Sambuc // CHECK: [[F2_LINE]] = !MDLocation({{.*}}, scope: [[F2]])
12*0a6a1f1dSLionel Sambuc 
f1()13*0a6a1f1dSLionel Sambuc void f1() {
14*0a6a1f1dSLionel Sambuc }
15*0a6a1f1dSLionel Sambuc 
16*0a6a1f1dSLionel Sambuc # 2 "foo.c"
17*0a6a1f1dSLionel Sambuc 
f2()18*0a6a1f1dSLionel Sambuc void f2() {
19*0a6a1f1dSLionel Sambuc }
20*0a6a1f1dSLionel Sambuc 
21