<div dir="ltr">On Wed, Jun 26, 2013 at 2:54 PM, Reid Kleckner <span dir="ltr"><<a href="mailto:rnk@google.com" target="_blank">rnk@google.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr">The motivation is that C++ record layout for the Microsoft C++ ABI is sufficiently different to warrant its own builder.  There's already lots of code in there for virtual bases and vtordisps and other fun things that don't concern Itanium.<div>

<br></div><div>Ultimately, we should be able to do MS C struct bitfield layout in this builder in addition to the C++ record layout.</div><div><br></div><div>This patch doesn't actually do anything with C++ record layout yet to keep the diff smaller and be more incremental.</div>

<div><br></div><div>Does that make sense to you?</div></div></blockquote><div><br></div><div>If you think the current MS C++ ABI support in RecordLayoutBuilder.cpp is unmaintainable, then yes, it makes sense to do something to separate it out.  That said, I still don't understand why duplicating the field layout routines helps us in any way; the current IsMsStruct checks are much more concise than duplicating the routines.  If you want to keep the MS and Itanium C++ code in separate files, we can introduce a common base class or something like that.<br>
</div><div><br></div><div>-Eli</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div class=""><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jun 26, 2013 at 5:41 PM, Eli Friedman <span dir="ltr"><<a href="mailto:eli.friedman@gmail.com" target="_blank">eli.friedman@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Sorry, I wasn't really paying attention to this patch before.<div>
<br></div><div>I've been looking through the review comments and I can't seem to find the motivation for why you're writing a new layout builder from scratch (and duplicating a bunch of code) instead of taking advantage of the existing IsMsStruct flag in RecordLayoutBuilder.cpp.  Is the difference between IsMsStruct and what you're implementing really that substantial?</div>



<div><br></div><div>I saw earlier in the review comments you were alluding to CodeGen crashes; that shouldn't be an issue as of r185018.</div><div><br></div><div>Please put the SemaDecl.cpp change into a separate patch.</div>


<div><br></div><div>-Eli</div><div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div>

On Wed, Jun 26, 2013 at 2:23 PM, Warren Hunt <span dir="ltr"><<a href="mailto:whunt@google.com" target="_blank">whunt@google.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<div><div>


  Addressing 2nd round of feedback, enabling a Sema error, clang format and some minor fixes.<br>
<div><br>
Hi rnk, rsmith,<br>
<br>
<a href="http://llvm-reviews.chandlerc.com/D1026" target="_blank">http://llvm-reviews.chandlerc.com/D1026</a><br>
<br>
CHANGE SINCE LAST DIFF<br>
</div>  <a href="http://llvm-reviews.chandlerc.com/D1026?vs=2536&id=2578#toc" target="_blank">http://llvm-reviews.chandlerc.com/D1026?vs=2536&id=2578#toc</a><br>
<div><div><br>
Files:<br>
  include/clang/AST/ASTContext.h<br>
  include/clang/Sema/Sema.h<br>
  lib/AST/CMakeLists.txt<br>
  lib/AST/MicrosoftRecordLayoutBuilder.cpp<br>
  lib/AST/RecordLayoutBuilder.cpp<br>
  lib/Sema/SemaDecl.cpp<br>
  test/Sema/ms_bitfield_layout.c<br>
</div></div><br></div></div>_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu" target="_blank">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
<br></blockquote></div><br></div></div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div></div>