Douglas Katzman | 3459ce2 | 2015-10-08 04:24:12 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -debug-info-kind=limited -emit-llvm < %s | FileCheck %s |
David Blaikie | aabde05 | 2014-05-14 00:29:00 +0000 | [diff] [blame] | 2 | |
| 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 Smith | 8cd9d7a | 2015-08-26 22:50:48 +0000 | [diff] [blame] | 8 | // CHECK: [[F1:![0-9]*]] = distinct !DISubprogram(name: "f1",{{.*}} isDefinition: true |
Duncan P. N. Exon Smith | 9dd4e4e | 2015-04-29 16:40:08 +0000 | [diff] [blame] | 9 | // CHECK: [[F1_LINE]] = !DILocation({{.*}}, scope: [[F1]]) |
Adrian Prantl | e76bda5 | 2016-04-15 15:55:45 +0000 | [diff] [blame] | 10 | // CHECK: [[F2:![0-9]*]] = distinct !DISubprogram(name: "f2",{{.*}} isDefinition: true |
Duncan P. N. Exon Smith | 9dd4e4e | 2015-04-29 16:40:08 +0000 | [diff] [blame] | 11 | // CHECK: [[F2_LINE]] = !DILocation({{.*}}, scope: [[F2]]) |
David Blaikie | aabde05 | 2014-05-14 00:29:00 +0000 | [diff] [blame] | 12 | |
| 13 | void f1() { |
| 14 | } |
| 15 | |
| 16 | # 2 "foo.c" |
| 17 | |
| 18 | void f2() { |
| 19 | } |
| 20 | |