aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGenCXX/debug-info-class.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2012-11-02 20:49:01 +0000
committerDavid Blaikie <dblaikie@gmail.com>2012-11-02 20:49:01 +0000
commit9417b05ef982bd3dbcae2fa24083b5be00d6c4f1 (patch)
treeecca785a294b0ffa910b4aeb96f7a7688a12a09e /test/CodeGenCXX/debug-info-class.cpp
parent715852c9ce1a0b6afe1928d8da4d51e138aed851 (diff)
Fix debug tag type of forward declarations of struct/class in C++.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167308 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/debug-info-class.cpp')
-rw-r--r--test/CodeGenCXX/debug-info-class.cpp18
1 files changed, 15 insertions, 3 deletions
diff --git a/test/CodeGenCXX/debug-info-class.cpp b/test/CodeGenCXX/debug-info-class.cpp
index 151c5f9053..dca8535fb2 100644
--- a/test/CodeGenCXX/debug-info-class.cpp
+++ b/test/CodeGenCXX/debug-info-class.cpp
@@ -1,12 +1,24 @@
-// RUN: %clang -emit-llvm -g -S %s -o - | grep HdrSize
-struct A {
+// RUN: %clang -emit-llvm -g -S %s -o - | FileCheck %s
+struct foo;
+void func(foo *f) { // CHECK: DW_TAG_structure_type
+}
+class bar;
+void func(bar *f) { // CHECK: DW_TAG_class_type
+}
+union baz;
+void func(baz *f) { // CHECK: DW_TAG_union_type
+}
+struct A { // FIXME: we're still emitting this as DW_TAG_class_type
int one;
- static const int HdrSize = 52;
+ static const int HdrSize = 52; // CHECK: HdrSize
int two;
A() {
int x = 1;
}
};
+class B { // CHECK: DW_TAG_class_type
+};
int main() {
A a;
+ B b;
}