If a derived type is also a composite type, print that information
authorEric Christopher <echristo@apple.com>
Mon, 20 Feb 2012 18:04:35 +0000 (18:04 +0000)
committerEric Christopher <echristo@apple.com>
Mon, 20 Feb 2012 18:04:35 +0000 (18:04 +0000)
too.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150974 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/DebugInfo.cpp

index 84b789959c38d321e180ad7854d922c86d958455..c655c4eabdb91a799796e8a732e2d082190f4544 100644 (file)
@@ -721,8 +721,13 @@ void DIType::print(raw_ostream &OS) const {
 
   if (isBasicType())
     DIBasicType(DbgNode).print(OS);
-  else if (isDerivedType())
-    DIDerivedType(DbgNode).print(OS);
+  else if (isDerivedType()) {
+    DIDerivedType DTy = DIDerivedType(DbgNode);
+    DTy.print(OS);
+    DICompositeType CTy = getDICompositeType(DTy);
+    if (CTy.Verify())
+      CTy.print(OS);
+  }
   else if (isCompositeType())
     DICompositeType(DbgNode).print(OS);
   else {