DmitryPolukhin added inline comments.

================
Comment at: lib/AST/RecordLayoutBuilder.cpp:1606
@@ -1605,1 +1605,3 @@
+    } else if (ExplicitFieldAlign)
+      FieldOffset = llvm::RoundUpToAlignment(FieldOffset, ExplicitFieldAlign);
 
----------------
rjmccall wrote:
> Be sure to test specifically with an APCS ARM target; newer ARM ABIs don't 
> ignore bit-field layout. Sorry, I should have been more explicit about that. 
> (You can figure this stuff out by looking at the various targets in 
> Targets.cpp that set UseBitFieldTypeAlignment.)
'-triple=arm-apcs-gnu' does give difference with GCC '-target=arm 
-mabi=apcs-gnu -mfloat-abi=softfp'. But even without my patch I see bunch of 
difference in layout (i.e. structs a2, a3, c, d, s0). So I just disabled my 
changes for APCS because it requires more attention than just fix explicit 
alignment case and I'm not sure that it is used enough nowadays.


http://reviews.llvm.org/D14980



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to