diff options
author | David Blaikie <dblaikie@gmail.com> | 2013-06-05 18:30:31 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2013-06-05 18:30:31 +0000 |
commit | 205a30d83d0e4d1c60e69b46d045c8dc5d9acfd4 (patch) | |
tree | 931bc46edde3306b26b727395513aec02080a111 /clang/test/CodeGenCXX/debug-info.cpp | |
parent | 2f390b755a6d68b8a73fa0324203652fac794c39 (diff) | |
download | bcm5719-llvm-205a30d83d0e4d1c60e69b46d045c8dc5d9acfd4.tar.gz bcm5719-llvm-205a30d83d0e4d1c60e69b46d045c8dc5d9acfd4.zip |
PR14763: Debug info for non-trivial record parameters
There seems to have been some erroneous code attempting to describe the
ABI of parameters (non-trivial record parameters are passed by
reference). This would break the type of the function (especially when
it caused a mismatch between the type of a declaration & a definition)
causing PR14763 and PR14645.
llvm-svn: 183329
Diffstat (limited to 'clang/test/CodeGenCXX/debug-info.cpp')
-rw-r--r-- | clang/test/CodeGenCXX/debug-info.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/debug-info.cpp b/clang/test/CodeGenCXX/debug-info.cpp index 4085b9ad328..9413575b86c 100644 --- a/clang/test/CodeGenCXX/debug-info.cpp +++ b/clang/test/CodeGenCXX/debug-info.cpp @@ -68,6 +68,20 @@ class Cls { Cls obj; } +namespace pr14763 { +struct foo { + foo(const foo&); +}; + +foo func(foo f) { + return f; // reference 'f' for now because otherwise we hit another bug +} + +// CHECK: [[FUNC:![0-9]*]] = {{.*}} metadata !"_ZN7pr147634funcENS_3fooE", i32 {{[0-9]*}}, metadata [[FUNC_TYPE:![0-9]*]], {{.*}} ; [ DW_TAG_subprogram ] {{.*}} [def] [func] +// CHECK: [[PR14763:![0-9]*]] = {{.*}} ; [ DW_TAG_namespace ] [pr14763] +// CHECK: [[FOO:![0-9]*]] = metadata !{i32 {{[0-9]*}}, metadata !{{[0-9]*}}, metadata [[PR14763]], {{.*}} ; [ DW_TAG_structure_type ] [foo] +} + namespace pr9608 { // also pr9600 struct incomplete; incomplete (*x)[3]; @@ -77,6 +91,9 @@ incomplete (*x)[3]; // CHECK: [[INCTYPE]] = {{.*}} ; [ DW_TAG_structure_type ] [incomplete]{{.*}} [fwd] } +// For some reason the argument for PR14763 ended up all the way down here +// CHECK: = metadata !{i32 {{[0-9]*}}, metadata [[FUNC]], {{.*}}, metadata [[FOO]], i32 0, i32 0} ; [ DW_TAG_arg_variable ] [f] + namespace pr16214 { struct a { int i; |