summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
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
commit1db0a2fab205b5b2c6297e1de7815cdf7b6f1220 (patch)
tree1d40cd19e3598d56189db5b5f3d1d806ea92f750 /clang/lib/CodeGen
parent711d12ef97794f5a746c686eb587a3138151b111 (diff)
downloadbcm5719-llvm-1db0a2fab205b5b2c6297e1de7815cdf7b6f1220.tar.gz
bcm5719-llvm-1db0a2fab205b5b2c6297e1de7815cdf7b6f1220.zip
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. llvm-svn: 155937
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/CGBlocks.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGBlocks.cpp b/clang/lib/CodeGen/CGBlocks.cpp
index 379da11033d..1a1fe65ff88 100644
--- a/clang/lib/CodeGen/CGBlocks.cpp
+++ b/clang/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
OpenPOWER on IntegriCloud