[tensorflow/compiler/mlir/xla/transforms/adjust_layout.cc] Reserve SmallVector allocation correctly
diff --git a/tensorflow/compiler/mlir/xla/transforms/adjust_layout.cc b/tensorflow/compiler/mlir/xla/transforms/adjust_layout.cc
index 1ef7567..f64079d 100644
--- a/tensorflow/compiler/mlir/xla/transforms/adjust_layout.cc
+++ b/tensorflow/compiler/mlir/xla/transforms/adjust_layout.cc
@@ -78,7 +78,8 @@
if (type.isa<TupleType>()) {
auto tuple_type = type.dyn_cast<TupleType>();
auto types = tuple_type.getTypes();
- llvm::SmallVector<mlir::Attribute, types.size()> v;
+ llvm::SmallVector<mlir::Attribute> v;
+ v.reserve(types.size());
for (const mlir::Type &t : types) {
auto layout = GetLayout(t, rewriter);
if (failed(layout)) return failure();