diff options
| author | David Blaikie <dblaikie@gmail.com> | 2014-04-04 23:16:44 +0000 |
|---|---|---|
| committer | David Blaikie <dblaikie@gmail.com> | 2014-04-04 23:16:44 +0000 |
| commit | 2f2df07fa4bcff566ccd586a52d29ed288caad6f (patch) | |
| tree | 1e67b7cc6e40020463ed7b3e33702af9880dbf39 /clang/test/CodeGenCXX/debug-info.cpp | |
| parent | e36fbea1750b8e75df1d5473f31a10c862cc85a3 (diff) | |
| download | bcm5719-llvm-2f2df07fa4bcff566ccd586a52d29ed288caad6f.tar.gz bcm5719-llvm-2f2df07fa4bcff566ccd586a52d29ed288caad6f.zip | |
DebugInfo: Place global constants in their appropriate context.
We also don't need to duplicate the name in the LinkageName field. Just
leave it empty.
llvm-svn: 205655
Diffstat (limited to 'clang/test/CodeGenCXX/debug-info.cpp')
| -rw-r--r-- | clang/test/CodeGenCXX/debug-info.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/clang/test/CodeGenCXX/debug-info.cpp b/clang/test/CodeGenCXX/debug-info.cpp index 7c89dfc04ce..26d647aa356 100644 --- a/clang/test/CodeGenCXX/debug-info.cpp +++ b/clang/test/CodeGenCXX/debug-info.cpp @@ -83,9 +83,16 @@ foo func(foo f) { // CHECK: [[FUNC:![0-9]*]] = {{.*}} metadata !"_ZN7pr147634funcENS_3fooE", i32 {{[0-9]*}}, metadata [[FUNC_TYPE:![0-9]*]], {{.*}} ; [ DW_TAG_subprogram ] {{.*}} [def] [func] } +namespace local_const { +const wchar_t lc_c = L'x'; +} + +// CHECK: metadata [[LOCAL_CONST:![0-9]*]], metadata !"lc_c", {{.*}}; [ DW_TAG_variable ] [lc_c] +// CHECK: [[LOCAL_CONST]] = {{.*}}; [ DW_TAG_namespace ] [local_const] + void foo() { const wchar_t c = L'x'; - wchar_t d = c; + wchar_t d = c + local_const::lc_c; } // CHECK-NOT: ; [ DW_TAG_variable ] [c] |

