<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:10pt"><div style="font-size: 10pt; font-family: arial, helvetica, sans-serif; "><span>The change appears to stem from:</span></div><div style="font-size: 13px; font-family: arial, helvetica, sans-serif; color: rgb(0, 0, 0); background-color: transparent; font-style: normal; "><span><br></span></div><div style="font-size: 13px; font-family: arial, helvetica, sans-serif; color: rgb(0, 0, 0); background-color: transparent; font-style: normal; "><span><span class="Apple-tab-span" style="white-space:pre">   </span></span><a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/RecordLayoutBuilder.cpp?r1=143800&r2=144072&diff_format=h" style="font-size: 10pt; ">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/RecordLayoutBuilder.cpp?r1=143800&r2=144072&diff_format=h</a></div><div style="color: rgb(0, 0, 0); background-color:
 transparent; "><span style="font-family: tahoma, 'new york', times, serif; font-size: 13px; "><span class="Apple-tab-span" style="white-space: pre; ">       </span><span>Revision </span><span style="color: rgb(136, 0, 136); "><a href="http://llvm.org/viewvc/llvm-project?view=rev&revision=144072" style="color: rgb(136, 0, 136); ">144072</a>, </span>Modified Mon Nov 7 22:01:03 2011 CST (9 months, 3 weeks ago) by rjmccall<span> </span></span></div><div style="color: rgb(0, 0, 0); background-color: transparent; "><span style="font-family: tahoma, 'new york', times, serif; font-size: 13px; "><span><span class="Apple-tab-span" style="white-space:pre">      </span></span><span style="white-space: pre-wrap; ">Fix the layout of vb-tables and vf-tables in the MS C++ ABI. </span></span><span style="font-family: tahoma, 'new york', times, serif; font-size: 13px; white-space: pre-wrap; background-color: transparent; ">Based on work by Dmitry
 Sokolov!</span></div><div style="color: rgb(0, 0, 0); background-color: transparent; font-size: 13px; font-family: tahoma, 'new york', times, serif; font-style: normal; "><span style="font-family: tahoma, 'new york', times, serif; font-size: 13px; white-space: pre-wrap; background-color: transparent; "><br></span></div><div style="color: rgb(0, 0, 0); background-color: transparent; font-size: 13px; font-family: tahoma, 'new york', times, serif; font-style: normal; "><span style="white-space: pre-wrap;">Trying to figure out what's different...</span></div><div style="color: rgb(0, 0, 0); background-color: transparent; font-size: 13px; font-family: tahoma, 'new york', times, serif; font-style: normal; "><span style="font-family: tahoma, 'new york', times, serif; font-size: 13px; white-space: pre-wrap; background-color: transparent; "><br></span></div><div style="font-size: 10pt; font-family: arial, helvetica, sans-serif; "><br></div>  <div
 style="font-size: 10pt; font-family: arial, helvetica, sans-serif; "> <div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "> <div dir="ltr"> <font size="2" face="Arial"> <hr size="1">  <b><span style="font-weight:bold;">From:</span></b> Don Williamson <don.williamson@yahoo.com><br> <b><span style="font-weight: bold;">To:</span></b> cfe-dev <cfe-dev@cs.uiuc.edu> <br> <b><span style="font-weight: bold;">Sent:</span></b> Thursday, August 30, 2012 11:26 AM<br> <b><span style="font-weight: bold;">Subject:</span></b> [cfe-dev] double/virtual offsets for MSVC broken in 3.1<br> </font> </div> <br>
<meta http-equiv="x-dns-prefetch-control" content="off"><div id="yiv1481710765"><div><div style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-family: arial, helvetica, sans-serif; font-size: 10pt; "><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt; ">Hi,</div><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt; "><br></div><div style="font-family: arial, helvetica, sans-serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal; ">last year I submitted a patch (commit by somebody else) to solve cases like this:</div><div style="font-family: arial, helvetica, sans-serif; font-size: 13px; color: rgb(0, 0, 0); background-color: transparent; font-style: normal; "><br></div><div style="background-color:transparent;"><div style="background-color:transparent;"><font face="arial, helvetica, sans-serif" size="2"><span class="yiv1481710765Apple-tab-span"
 style="white-space:pre;"> </span>// The addition of a double anywhere in this struct forces the vtable ptr to occupy 4 bytes
 + 4 bytes padding in MSVC</font></div><div style="background-color:transparent;"><font face="arial, helvetica, sans-serif" size="2"><span class="yiv1481710765Apple-tab-span" style="white-space:pre;">        </span>struct DoubleInPolymorphicStruct</font></div><div style="background-color:transparent;"><font face="arial, helvetica, sans-serif" size="2"><span class="yiv1481710765Apple-tab-span" style="white-space:pre;">     </span>{</font></div><div style="background-color:transparent;"><font face="arial, helvetica, sans-serif" size="2"><span class="yiv1481710765Apple-tab-span" style="white-space:pre;">            </span>virtual void Empty() { }</font></div><div style="background-color:transparent;"><font face="arial, helvetica, sans-serif" size="2"><span class="yiv1481710765Apple-tab-span" style="white-space:pre;">             </span>int a;</font></div><div style="background-color:transparent;"><font face="arial, helvetica, sans-serif" size="2"><span class="yiv1481710765Apple-tab-span"
 style="white-space:pre;">         </span>double b;</font></div><div style="background-color:transparent;"><span class="yiv1481710765Apple-tab-span" style="font-family: arial, helvetica, sans-serif; font-size: 13px; background-color: transparent; white-space: pre; ">    </span><span style="font-family: arial, helvetica, sans-serif; font-size: small; background-color: transparent; ">};</span><br></div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 13px; font-style: normal; "><br></div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 13px; font-style: normal; background-color: transparent; ">The offset of a in MSVC is 8 bytes, but clang in MSVC offset calculation mode puts it at 4. The initial posts are here:</div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 13px; font-style: normal; background-color: transparent; "><br></div><div style="color:
 rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 13px; font-style: normal; background-color: transparent; "><span class="yiv1481710765Apple-tab-span" style="white-space:pre;">   </span>http://lists.cs.uiuc.edu/pipermail/cfe-dev/2011-September/016944.html</div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 13px; font-style: normal; background-color: transparent; "><span class="yiv1481710765Apple-tab-span" style="white-space:pre;">   </span>http://lists.cs.uiuc.edu/pipermail/cfe-dev/2011-September/016970.html</div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 13px; font-style: normal; background-color: transparent; "><br></div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 13px; font-style: normal; background-color: transparent; ">These changes did not make it into 3.0 but as far as I could tell, did make it into the
 trunk. However, I've just sync'ed up to the 3.1 release and this is still a problem.</div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 13px; font-style: normal; background-color: transparent; "><br></div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 13px; font-style: normal; background-color: transparent; ">I'm about to go back and take a look and what's broken but it'll take me a couple of hours to settle back into the code again.</div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 13px; font-style: normal; background-color: transparent; "><br></div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 13px; font-style: normal; background-color: transparent; ">Meanwhile, could anybody help with any ideas as to what may have changed?</div><div style="color: rgb(0, 0, 0); font-family: arial,
 helvetica, sans-serif; font-size: 13px; font-style: normal; background-color: transparent; "><br></div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 13px; font-style: normal; background-color: transparent; ">Thanks!</div><div style="color: rgb(0, 0, 0); font-family: arial, helvetica, sans-serif; font-size: 13px; font-style: normal; background-color: transparent; ">- Don</div></div></div></div></div><meta http-equiv="x-dns-prefetch-control" content="on"><br>_______________________________________________<br>cfe-dev mailing list<br><a ymailto="mailto:cfe-dev@cs.uiuc.edu" href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br><br><br> </div> </div>  </div></body></html>