Substitute getI64IntegerAttr for the more verbose code it replaces.

--

PiperOrigin-RevId: 246227344
This commit is contained in:
Geoffrey Martin-Noble 2019-05-01 17:03:32 -07:00 committed by Mehdi Amini
parent b14c4b4ca8
commit 45c8245cca
3 changed files with 3 additions and 3 deletions

View File

@ -137,7 +137,7 @@ static ArrayAttr makePositionAttr(FuncBuilder &builder,
SmallVector<Attribute, 4> attrs;
attrs.reserve(position.size());
for (auto p : position)
attrs.push_back(builder.getIntegerAttr(builder.getIntegerType(64), p));
attrs.push_back(builder.getI64IntegerAttr(p));
return builder.getArrayAttr(attrs);
}

View File

@ -44,7 +44,7 @@ static ArrayAttr makePositionAttr(FuncBuilder &builder,
SmallVector<Attribute, 4> attrs;
attrs.reserve(position.size());
for (auto p : position)
attrs.push_back(builder.getIntegerAttr(builder.getIntegerType(64), p));
attrs.push_back(builder.getI64IntegerAttr(p));
return builder.getArrayAttr(attrs);
}

View File

@ -409,7 +409,7 @@ struct ViewDescriptor {
SmallVector<Attribute, 4> attrs;
attrs.reserve(position.size());
for (auto p : position)
attrs.push_back(builder.getIntegerAttr(builder.getIntegerType(64), p));
attrs.push_back(builder.getI64IntegerAttr(p));
return builder.getArrayAttr(attrs);
}