forked from OSchip/llvm-project
Fix 'warning: comparison is always true due to limited range of data type [-Wtype-limits]' with GCC 7.3
llvm-svn: 361840
This commit is contained in:
parent
a2ca6e7803
commit
756565d470
|
@ -860,7 +860,7 @@ MergeChunk::MergeChunk(uint32_t Alignment)
|
|||
void MergeChunk::addSection(SectionChunk *C) {
|
||||
assert(isPowerOf2_32(C->getAlignment()));
|
||||
uint8_t P2Align = llvm::Log2_32(C->getAlignment());
|
||||
assert(P2Align >= 0 && P2Align < array_lengthof(Instances));
|
||||
assert(P2Align < array_lengthof(Instances));
|
||||
auto *&MC = Instances[P2Align];
|
||||
if (!MC)
|
||||
MC = make<MergeChunk>(C->getAlignment());
|
||||
|
|
Loading…
Reference in New Issue