From: Reid Kleckner Date: Thu, 20 Feb 2014 23:07:29 +0000 (+0000) Subject: Revert "Enable MSRecordLayout in the presence of external sources." X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9e1078f32e6a48b9d9e38cb640acf1f6b43642a0;p=clang Revert "Enable MSRecordLayout in the presence of external sources." This reverts commit r201810. It was failing these tests on my workstation: Clang :: CodeGen/override-layout.c Clang :: CodeGenCXX/override-layout.cpp Clang :: PCH/check-deserializations.cpp git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201823 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/AST/RecordLayoutBuilder.cpp b/lib/AST/RecordLayoutBuilder.cpp index dc3efe99da..139ee60ef8 100644 --- a/lib/AST/RecordLayoutBuilder.cpp +++ b/lib/AST/RecordLayoutBuilder.cpp @@ -2892,7 +2892,7 @@ ASTContext::getASTRecordLayout(const RecordDecl *D) const { const ASTRecordLayout *NewEntry = 0; - if (isMsLayout(D)) { + if (isMsLayout(D) && !D->getASTContext().getExternalSource()) { NewEntry = BuildMicrosoftASTRecordLayout(D); } else if (const CXXRecordDecl *RD = dyn_cast(D)) { EmptySubobjectMap EmptySubobjects(*this, RD);