]> granicus.if.org Git - clang/commitdiff
Remove now-unnecessary check for non-zero nvsize in addition to
authorRichard Smith <richard-llvm@metafoo.co.uk>
Mon, 7 May 2018 06:43:31 +0000 (06:43 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Mon, 7 May 2018 06:43:31 +0000 (06:43 +0000)
emptyness in MS record layout.

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

lib/AST/RecordLayoutBuilder.cpp

index 47e696a5dc7196cf1ce71b31f6fbd9bf67877f69..33c7fcdb169d3c6622ea2dc1f0ccdf7fdcb5596d 100644 (file)
@@ -2617,8 +2617,8 @@ void MicrosoftRecordLayoutBuilder::layoutNonVirtualBase(
   }
 
   if (!FoundBase) {
-    if (MDCUsesEBO && BaseDecl->isEmpty() &&
-        BaseLayout.getNonVirtualSize() == CharUnits::Zero()) {
+    if (MDCUsesEBO && BaseDecl->isEmpty()) {
+      assert(BaseLayout.getNonVirtualSize() == CharUnits::Zero());
       BaseOffset = CharUnits::Zero();
     } else {
       // Otherwise, lay the base out at the end of the MDC.