]> granicus.if.org Git - clang/commitdiff
Do not ignore anonymous records.
authorDevang Patel <dpatel@apple.com>
Fri, 12 Feb 2010 01:31:06 +0000 (01:31 +0000)
committerDevang Patel <dpatel@apple.com>
Fri, 12 Feb 2010 01:31:06 +0000 (01:31 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95953 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGDebugInfo.cpp

index e5162ed7f15f2267a563b19fe4e45d41a58ed592..5b9c6b055e0edd3ea910a9ba893632cf1da4cd85 100644 (file)
@@ -484,8 +484,8 @@ CollectRecordFields(const RecordDecl *RD, llvm::DICompileUnit Unit,
 
     llvm::StringRef FieldName = Field->getName();
 
-    // Ignore unnamed fields.
-    if (FieldName.empty())
+    // Ignore unnamed fields. Do not ignore unnamed records.
+    if (FieldName.empty() && !isa<RecordType>(Field->getType()))
       continue;
 
     // Get the location for the field.