diff options
author | Anders Carlsson <andersca@mac.com> | 2009-09-22 19:16:59 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-09-22 19:16:59 +0000 |
commit | 56cfdc183e6012201c7e0a45b04fe74fd1ab51e4 (patch) | |
tree | bab1e583ffb9082b5723fc17008cfe25f0ac6d59 /lib/AST/RecordLayoutBuilder.cpp | |
parent | 8ebcdfe7992c90c22ef26c7743b6a08a6a837387 (diff) |
If we already set a primary base, don't set it to the first nearly empty base class.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82563 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/RecordLayoutBuilder.cpp')
-rw-r--r-- | lib/AST/RecordLayoutBuilder.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/AST/RecordLayoutBuilder.cpp b/lib/AST/RecordLayoutBuilder.cpp index 836e43c43a..8a3e08965f 100644 --- a/lib/AST/RecordLayoutBuilder.cpp +++ b/lib/AST/RecordLayoutBuilder.cpp @@ -158,8 +158,8 @@ void ASTRecordLayoutBuilder::SelectPrimaryBase(const CXXRecordDecl *RD) { // Otherwise if is the first nearly empty virtual base, if one exists, // otherwise there is no primary base class. - setPrimaryBase(FirstPrimary, true); - return; + if (!PrimaryBase) + setPrimaryBase(FirstPrimary, true); } void ASTRecordLayoutBuilder::LayoutVirtualBase(const CXXRecordDecl *RD) { |