]> granicus.if.org Git - clang/commitdiff
Enable MSRecordLayout in the presence of external sources.
authorWarren Hunt <whunt@google.com>
Thu, 20 Feb 2014 20:14:29 +0000 (20:14 +0000)
committerWarren Hunt <whunt@google.com>
Thu, 20 Feb 2014 20:14:29 +0000 (20:14 +0000)
External sources shouldn't prevent the layout engine from using
MSLayout.  If lldb were to support debugging in microsoft mode, some
code will need to be added to MSRecordLayoutBuilder to handel external
layouts.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201810 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/RecordLayoutBuilder.cpp

index 139ee60ef8029f15af49deea96fd0d6e30e4f3cb..dc3efe99da30ae89b9825d0915cc131e20853ef8 100644 (file)
@@ -2892,7 +2892,7 @@ ASTContext::getASTRecordLayout(const RecordDecl *D) const {
 
   const ASTRecordLayout *NewEntry = 0;
 
-  if (isMsLayout(D) && !D->getASTContext().getExternalSource()) {
+  if (isMsLayout(D)) {
     NewEntry = BuildMicrosoftASTRecordLayout(D);
   } else if (const CXXRecordDecl *RD = dyn_cast<CXXRecordDecl>(D)) {
     EmptySubobjectMap EmptySubobjects(*this, RD);