aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGBlocks.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2012-05-01 20:28:00 +0000
committerJohn McCall <rjmccall@apple.com>2012-05-01 20:28:00 +0000
commit6c803f7f46533c69e2f8a9a882af9ae3b7fffb6f (patch)
tree0a4b253e7b29400ad42d051286c5597024e06b1b /lib/CodeGen/CGBlocks.cpp
parentedb45f092ec474d03e8f42ce5a416b3f43ab78c9 (diff)
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
Diffstat (limited to 'lib/CodeGen/CGBlocks.cpp')
-rw-r--r--lib/CodeGen/CGBlocks.cpp3
1 files changed, 2 insertions, 1 deletions
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