summaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index dbbbf7fd554b..5184a363f18f 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -4631,6 +4631,10 @@ void CodeGenModule::EmitGlobalVarDefinition(const VarDecl *D,
if (getLangOpts().CPlusPlus && !NeedsGlobalDtor)
DelayedCXXInitPosition.erase(D);
+#if 0
+ // FIXME: The following check doesn't handle flexible array members
+ // inside tail padding (which don't actually increase the size of
+ // the struct).
#ifndef NDEBUG
CharUnits VarSize = getContext().getTypeSizeInChars(ASTTy) +
InitDecl->getFlexibleArrayInitChars(getContext());
@@ -4638,6 +4642,7 @@ void CodeGenModule::EmitGlobalVarDefinition(const VarDecl *D,
getDataLayout().getTypeAllocSize(Init->getType()));
assert(VarSize == CstSize && "Emitted constant has unexpected size");
#endif
+#endif
}
}