diff options
author | Eric Christopher <echristo@gmail.com> | 2013-04-02 22:59:11 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2013-04-02 22:59:11 +0000 |
commit | f068c92f22cc5c42433f5bd37b000a714a56670f (patch) | |
tree | 68bc9dd9cefe1a25b73a1c8f2a4932f021180cfd /test/CodeGenCXX | |
parent | 58b65d953e67251bfce28a5251bb3b496490f343 (diff) |
Revert "Revert r178079, it caused PR15637."
This reverts commit r178497 since the backend has been fixed.
Also add a test to ensure that we're emitting template information for unions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178587 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX')
-rw-r--r-- | test/CodeGenCXX/debug-info-union-template.cpp | 15 | ||||
-rw-r--r-- | test/CodeGenCXX/debug-info.cpp | 7 |
2 files changed, 15 insertions, 7 deletions
diff --git a/test/CodeGenCXX/debug-info-union-template.cpp b/test/CodeGenCXX/debug-info-union-template.cpp new file mode 100644 index 0000000000..f5e6e14a71 --- /dev/null +++ b/test/CodeGenCXX/debug-info-union-template.cpp @@ -0,0 +1,15 @@ +// RUN: %clang_cc1 -emit-llvm -g -triple x86_64-linux-gnu %s -o - | FileCheck %s + +// Make sure that the union type has template parameters. + +namespace PR15637 { + template <typename T> union Value { int a; }; + void g(float value) { + Value<float> tempValue; + } + Value<float> f; +} + +// CHECK: {{.*}}, metadata !"Value<float>", {{.*}}, null, metadata [[TTPARAM:.*]]} ; [ DW_TAG_union_type ] [Value<float>] +// CHECK: [[TTPARAM]] = metadata !{metadata [[PARAMS:.*]]} +// CHECK: [[PARAMS]] = metadata !{{{.*}}metadata !"T",{{.*}}} ; [ DW_TAG_template_type_parameter ] diff --git a/test/CodeGenCXX/debug-info.cpp b/test/CodeGenCXX/debug-info.cpp index 7bca6e720c..33b52789ca 100644 --- a/test/CodeGenCXX/debug-info.cpp +++ b/test/CodeGenCXX/debug-info.cpp @@ -67,10 +67,3 @@ class Cls { Cls obj; } - -namespace PR15637 { -template <typename T> union Value { int a; }; -void g(float value) { - Value<float> tempValue; -} -} |