]> granicus.if.org Git - clang/commitdiff
CGRecordLayoutBuilder: Switch unions to use same mechanism for tracking field and...
authorDaniel Dunbar <daniel@zuster.org>
Wed, 31 Mar 2010 00:55:13 +0000 (00:55 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Wed, 31 Mar 2010 00:55:13 +0000 (00:55 +0000)
 - Anders, please check.

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

lib/CodeGen/CGRecordLayoutBuilder.cpp

index a87c8bcbbc2b9db8412e21d2f234f3068e8a0a6f..3ddf1b58d5a3f82454ad693a0843ca2b3e9976bf 100644 (file)
@@ -288,9 +288,10 @@ void CGRecordLayoutBuilder::LayoutUnion(const RecordDecl *D) {
         continue;
 
       // Add the bit field info.
-      Types.addBitFieldInfo(*Field, 0, 0, FieldSize);
-    } else
-      Types.addFieldInfo(*Field, 0);
+      LLVMBitFields.push_back(LLVMBitFieldInfo(*Field, 0, 0, FieldSize));
+    } else {
+      LLVMFields.push_back(LLVMFieldInfo(*Field, 0));
+    }
 
     HasOnlyZeroSizedBitFields = false;