I think it makes sense for the two bugs to be distinct.

================
Comment at: lib/CodeGen/CGRecordLayoutBuilder.cpp:347
@@ -346,2 +346,3 @@
   // beneficial.
   uint64_t EndOffset = Types.getContext().toBits(Layout.getDataSize());
+  if (Types.getContext().getLangOpts().CPlusPlus)
----------------
This would make more sense written as:

  uint64_t EndOffset;
  if (Types.getContext().getLangOpts().CPlusPlus)
    EndOffset = Types.getContext().toBits(Layout.getNonVirtualSize());
  else
    EndOffset = Types.getContext().toBits(Layout.getDataSize());

That being said, why do we need the language check at all? Couldn't we always 
use `Layout.getNonVirtualSize()`?


http://llvm-reviews.chandlerc.com/D2560
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to