This bug isn't specific to Microsoft layout. Clang as a general rule requires fields to be added in offset order, and iterating over a dense map doesn't give you that.<br><br>I'll let majnemer or rnk comment on the ExternalASTSource interface <br><div class="gmail_quote">On Tue, Mar 24, 2015 at 10:15 AM Sean Callanan <<a href="mailto:scallanan@apple.com">scallanan@apple.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">As an aside, when laying out a RecordDecl, you have the ordering for its fields right in the RecordDecl. If MicrosoftRecordLayoutBuilder relying on the llvm::DenseMap for ordering, I think it's MicrosoftRecordLayoutBuilder that has the bug. By my understanding of how record layout works, it should only be using the map to go from fields/bases to offsets – nothing else.<br>
<br>
<br>
REPOSITORY<br>
rL LLVM<br>
<br>
<a href="http://reviews.llvm.org/D8512" target="_blank">http://reviews.llvm.org/D8512</a><br>
<br>
EMAIL PREFERENCES<br>
<a href="http://reviews.llvm.org/settings/panel/emailpreferences/" target="_blank">http://reviews.llvm.org/<u></u>settings/panel/<u></u>emailpreferences/</a><br>
<br>
<br>
</blockquote></div>