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:
Alex Zinenko 2019-06-12 08:17:13 -07:00 committed by Mehdi Amini
parent d43b8923e0
commit 867867a44d
1 changed files with 1 additions and 1 deletions

View File

@ -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.