[PATCH] Microsoft Record Layout Required Alignment

Reid Kleckner rnk at google.com
Wed Dec 4 11:04:47 PST 2013



================
Comment at: include/clang/AST/RecordLayout.h:87
@@ +86,3 @@
+    /// the __declspec(align()) trumps #pramga pack and must always be obeyed.
+    CharUnits RequiredAlignment;
+
----------------
What about record subobjects in plain C?  Don't they also have this property?  Seems like it needs to live on ASTRecordLayout.

================
Comment at: lib/AST/RecordLayoutBuilder.cpp:2156
@@ +2155,3 @@
+  if (!MaxFieldAlignment.isZero())
+    BaseAlignment = std::min(BaseAlignment,
+                             std::max(MaxFieldAlignment,
----------------
Remind me why this is a min?


http://llvm-reviews.chandlerc.com/D2283



More information about the cfe-commits mailing list