forked from OSchip/llvm-project
Fix static assertion in AttributeDetail.h
llvm::maskTrailingOnes<char> runs into a static assertion on the type not being unsigned. Use `unsigned char` instead of `char`. PiperOrigin-RevId: 252827214
This commit is contained in:
parent
d43b8923e0
commit
867867a44d
|
@ -469,7 +469,7 @@ struct DenseElementsAttributeStorage : public AttributeStorage {
|
|||
if (splatValue && numOddElements != 0) {
|
||||
// Check that all bits are set in the last value.
|
||||
char lastElt = splatData.back();
|
||||
if (lastElt != llvm::maskTrailingOnes<char>(numOddElements))
|
||||
if (lastElt != llvm::maskTrailingOnes<unsigned char>(numOddElements))
|
||||
return KeyTy(ty, data, llvm::hash_value(data));
|
||||
|
||||
// If this is the only element, the data is known to be a splat.
|
||||
|
|
Loading…
Reference in New Issue