]> granicus.if.org Git - clang/commitdiff
Revert "Enable MSRecordLayout in the presence of external sources."
authorReid Kleckner <reid@kleckner.net>
Thu, 20 Feb 2014 23:07:29 +0000 (23:07 +0000)
committerReid Kleckner <reid@kleckner.net>
Thu, 20 Feb 2014 23:07:29 +0000 (23:07 +0000)
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

lib/AST/RecordLayoutBuilder.cpp

index dc3efe99da30ae89b9825d0915cc131e20853ef8..139ee60ef8029f15af49deea96fd0d6e30e4f3cb 100644 (file)
@@ -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<CXXRecordDecl>(D)) {
     EmptySubobjectMap EmptySubobjects(*this, RD);