[cfe-commits] r117921 - /cfe/trunk/lib/AST/RecordLayoutBuilder.cpp

Anders Carlsson andersca at mac.com
Mon Nov 1 08:14:51 PDT 2010


Author: andersca
Date: Mon Nov  1 10:14:51 2010
New Revision: 117921

URL: http://llvm.org/viewvc/llvm-project?rev=117921&view=rev
Log:
Don't update empty field subobjects for bitfields. Fixes PR8519.

Modified:
    cfe/trunk/lib/AST/RecordLayoutBuilder.cpp

Modified: cfe/trunk/lib/AST/RecordLayoutBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/RecordLayoutBuilder.cpp?rev=117921&r1=117920&r2=117921&view=diff
==============================================================================
--- cfe/trunk/lib/AST/RecordLayoutBuilder.cpp (original)
+++ cfe/trunk/lib/AST/RecordLayoutBuilder.cpp Mon Nov  1 10:14:51 2010
@@ -494,7 +494,9 @@
   for (CXXRecordDecl::field_iterator I = RD->field_begin(), E = RD->field_end();
        I != E; ++I, ++FieldNo) {
     const FieldDecl *FD = *I;
-    
+    if (FD->isBitField())
+      continue;
+
     CharUnits FieldOffset = Offset + getFieldOffset(Layout, FieldNo);
 
     UpdateEmptyFieldSubobjects(FD, FieldOffset);





More information about the cfe-commits mailing list