llvm.org GIT mirror llvm / ae2a506
Use 'alignTo' instead of re-inventing it. NFC git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264623 91177308-0d34-0410-b5e6-96231b3b80d8 Douglas Katzman 4 years ago
1 changed file(s) with 2 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
1616
1717 #include "llvm/Bitcode/BitCodes.h"
1818 #include "llvm/Support/Endian.h"
19 #include "llvm/Support/MathExtras.h"
1920 #include "llvm/Support/StreamingMemoryObject.h"
2021 #include
2122 #include
365366 assert(getCurrentByteNo() < Limit && "Move cursor before lowering limit");
366367
367368 // Round to word boundary.
368 if (Limit & (sizeof(word_t) - 1))
369 Limit += sizeof(word_t) - Limit & (sizeof(word_t) - 1);
369 Limit = alignTo(Limit, sizeof(word_t));
370370
371371 // Only change size if the new one is lower.
372372 if (!Size || Size > Limit)