Fix -Wunused-variable warning, NFC.
authorHaojian Wu <hokein.wu@gmail.com>
Fri, 24 Apr 2020 09:03:53 +0000 (11:03 +0200)
committerHaojian Wu <hokein.wu@gmail.com>
Fri, 24 Apr 2020 09:04:40 +0000 (11:04 +0200)
mlir/lib/IR/AttributeDetail.h

index 49995da..93829ae 100644 (file)
@@ -597,8 +597,8 @@ struct DenseStringElementsAttributeStorage
       return KeyTy(ty, data, llvm::hash_value(data), isKnownSplat);
 
     // Handle the simple case of only one element.
-    size_t numElements = ty.getNumElements();
-    assert(numElements != 1 && "splat of 1 element should already be detected");
+    assert(ty.getNumElements() != 1 &&
+           "splat of 1 element should already be detected");
 
     // Create the initial hash value with just the first element.
     const auto &firstElt = data.front();