We were previously overflowing a 32-bit multiply operation when emitting large
(>512MB) bitcode files, resulting in corrupted bitcode. Fix by extending
one of the operands to 64 bits.
There are a few other 32-bit integer types in this code that seem like they
also ought to be extended to 64 bits; this will be done separately.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251323
91177308-0d34-0410-b5e6-
96231b3b80d8
// Compute the size of the block, in words, not counting the size field.
unsigned SizeInWords = GetWordIndex() - B.StartSizeWord - 1;
- uint64_t BitNo = B.StartSizeWord * 32;
+ uint64_t BitNo = uint64_t(B.StartSizeWord) * 32;
// Update the block size field in the header of this sub-block.
BackpatchWord(BitNo, SizeInWords);