diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2014-11-24 09:15:30 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2014-11-24 09:15:30 +0000 |
| commit | 9f4dbff6669c8037f3b036bcf580d14f1a4f12a5 (patch) | |
| tree | 47df2c12b57214af6c31e47404b005675b8b7ffc /test/CodeGenCXX/globalinit-loc.cpp | |
| parent | f73d5f23a889b93d89ddef61ac0995df40286bb8 (diff) | |
Notes
Diffstat (limited to 'test/CodeGenCXX/globalinit-loc.cpp')
| -rw-r--r-- | test/CodeGenCXX/globalinit-loc.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/CodeGenCXX/globalinit-loc.cpp b/test/CodeGenCXX/globalinit-loc.cpp new file mode 100644 index 000000000000..eb39aec94d48 --- /dev/null +++ b/test/CodeGenCXX/globalinit-loc.cpp @@ -0,0 +1,23 @@ +// RUN: %clang_cc1 -emit-llvm -g %s -o - | FileCheck %s +// rdar://problem/14985269. +// +// Verify that the global init helper function does not get associated +// with any source location. +// +// CHECK: define internal void @_GLOBAL__sub_I_globalinit_loc.cpp +// CHECK: !dbg ![[DBG:.*]] +// CHECK: "_GLOBAL__sub_I_globalinit_loc.cpp", i32 0, {{.*}}, i32 0} ; [ DW_TAG_subprogram ] [line 0] [local] [def] +// CHECK: ![[DBG]] = metadata !{i32 0, i32 0, +# 99 "someheader.h" +class A { +public: + A(); + int foo() { return 0; } +}; +# 5 "main.cpp" +A a; + +int f() { + return a.foo(); +} + |
