Index: include/llvm/Bitcode/BitstreamReader.h =================================================================== --- include/llvm/Bitcode/BitstreamReader.h +++ include/llvm/Bitcode/BitstreamReader.h @@ -367,7 +367,7 @@ // Round to word boundary. if (Limit & (sizeof(word_t) - 1)) - Limit += sizeof(word_t) - Limit & (sizeof(word_t) - 1); + Limit += sizeof(word_t) - (Limit & (sizeof(word_t) - 1)); // Only change size if the new one is lower. if (!Size || Size > Limit)