blob: 94123bbc4935e977bf18ac784b7ab24b47d52d43 [file] [log] [blame]
Douglas Katzman3459ce22015-10-08 04:24:12 +00001// RUN: %clang_cc1 -debug-info-kind=limited -emit-llvm < %s | FileCheck %s
David Blaikieaabde052014-05-14 00:29:00 +00002
3// Check that, just because we emitted a function from a different file doesn't
4// mean we insert a file-change inside the next function.
5
6// CHECK: ret void, !dbg [[F1_LINE:![0-9]*]]
7// CHECK: ret void, !dbg [[F2_LINE:![0-9]*]]
Duncan P. N. Exon Smith8cd9d7a2015-08-26 22:50:48 +00008// CHECK: [[F1:![0-9]*]] = distinct !DISubprogram(name: "f1",{{.*}} isDefinition: true
Duncan P. N. Exon Smith9dd4e4e2015-04-29 16:40:08 +00009// CHECK: [[F1_LINE]] = !DILocation({{.*}}, scope: [[F1]])
Adrian Prantle76bda52016-04-15 15:55:45 +000010// CHECK: [[F2:![0-9]*]] = distinct !DISubprogram(name: "f2",{{.*}} isDefinition: true
Duncan P. N. Exon Smith9dd4e4e2015-04-29 16:40:08 +000011// CHECK: [[F2_LINE]] = !DILocation({{.*}}, scope: [[F2]])
David Blaikieaabde052014-05-14 00:29:00 +000012
13void f1() {
14}
15
16# 2 "foo.c"
17
18void f2() {
19}
20