Stephen Hines | 6bcf27b | 2014-05-29 04:14:42 -0700 | [diff] [blame] | 1 | // RUN: %clang_cc1 -emit-llvm -g %s -o - | FileCheck %s |
| 2 | // rdar://problem/14985269. |
| 3 | // |
| 4 | // Verify that the global init helper function does not get associated |
| 5 | // with any source location. |
| 6 | // |
| 7 | // CHECK: define internal void @_GLOBAL__sub_I_globalinit_loc.cpp |
| 8 | // CHECK: !dbg ![[DBG:.*]] |
Pirama Arumuga Nainar | 3ea9e33 | 2015-04-08 08:57:32 -0700 | [diff] [blame] | 9 | // CHECK: !MDSubprogram(linkageName: "_GLOBAL__sub_I_globalinit_loc.cpp" |
| 10 | // CHECK-NOT: line: |
| 11 | // CHECK-SAME: isLocal: true |
| 12 | // CHECK-SAME: isDefinition: true |
Stephen Hines | 0e2c34f | 2015-03-23 12:09:02 -0700 | [diff] [blame] | 13 | // CHECK: ![[DBG]] = !MDLocation(line: 0, |
Stephen Hines | 6bcf27b | 2014-05-29 04:14:42 -0700 | [diff] [blame] | 14 | # 99 "someheader.h" |
| 15 | class A { |
| 16 | public: |
| 17 | A(); |
| 18 | int foo() { return 0; } |
| 19 | }; |
| 20 | # 5 "main.cpp" |
| 21 | A a; |
| 22 | |
| 23 | int f() { |
| 24 | return a.foo(); |
| 25 | } |
| 26 | |