r192494 - Adds Microsoft compatiable C++ record layout code to clang.

Warren Hunt whunt at google.com
Tue Feb 11 00:03:41 PST 2014


There is no code in the MS Record Layout builder to handle external sources
so the behavior is unlikely to be correct in the case of an external source
(hence the guard).  I don't know anything about how PCH works or interacts
with clang on windows.  I'll try to get a better answer for you but in the
time being I'd suggest not using PCH and clang on windows in combination.

-Warren


On Thu, Feb 6, 2014 at 4:23 PM, Will Wilson <will at indefiant.com> wrote:

> Hi Warren,
>
> I've just been hunting a bug in MS mode where records were being given
> different layouts depending on if the TU was built with a PCH or not. In
> the end I tracked it down to ASTContext::getASTRecordLayout() introduced
> in r192494:
>
>   if (isMsLayout(D) && !D->getASTContext().getExternalSource()) {
>     NewEntry = BuildMicrosoftASTRecordLayout(D);
>
> Removing the "&& !D->getASTContext().getExternalSource()" restored the
> expected behaviour. Is this check still needed?
>
> Cheers,
> Will.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140211/5f10e378/attachment.html>


More information about the cfe-commits mailing list