Use isa instead of dyn_cast as cast value isn't used.
authorJacques Pienaar <jpienaar@google.com>
Sun, 7 Jul 2019 21:04:46 +0000 (14:04 -0700)
committerA. Unique TensorFlower <gardener@tensorflow.org>
Sun, 7 Jul 2019 21:05:16 +0000 (14:05 -0700)
Avoids unused variable warning.

PiperOrigin-RevId: 256874512

mlir/lib/StandardOps/Ops.cpp

index 1e7a840..3be51e6 100644 (file)
@@ -558,7 +558,7 @@ static Type getCheckedI1SameShape(Builder *build, Type type) {
     return i1Type;
   if (auto tensorType = type.dyn_cast<RankedTensorType>())
     return build->getTensorType(tensorType.getShape(), i1Type);
-  if (auto tensorType = type.dyn_cast<UnrankedTensorType>())
+  if (type.isa<UnrankedTensorType>())
     return build->getTensorType(i1Type);
   if (auto vectorType = type.dyn_cast<VectorType>())
     return build->getVectorType(vectorType.getShape(), i1Type);