From 6c803f7f46533c69e2f8a9a882af9ae3b7fffb6f Mon Sep 17 00:00:00 2001 From: John McCall Date: Tue, 1 May 2012 20:28:00 +0000 Subject: During block layout, after padding up to the max field alignment, the alignment might actually exceed the max field alignment; don't assert in this case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155937 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGBlocks.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/CodeGen/CGBlocks.cpp') diff --git a/lib/CodeGen/CGBlocks.cpp b/lib/CodeGen/CGBlocks.cpp index 379da11033..1a1fe65ff8 100644 --- a/lib/CodeGen/CGBlocks.cpp +++ b/lib/CodeGen/CGBlocks.cpp @@ -469,9 +469,10 @@ static void computeBlockInfo(CodeGenModule &CGM, CodeGenFunction *CGF, elementTypes.push_back(llvm::ArrayType::get(CGM.Int8Ty, padding.getQuantity())); blockSize = newBlockSize; - endAlign = maxFieldAlign; + endAlign = getLowBit(blockSize); // might be > maxFieldAlign } + assert(endAlign >= maxFieldAlign); assert(endAlign == getLowBit(blockSize)); // Slam everything else on now. This works because they have -- cgit v1.2.3-70-g09d2