[Mlir-commits] [mlir] 500d378 - Fix -Wunused-variable warning, NFC.

Haojian Wu llvmlistbot at llvm.org
Fri Apr 24 02:04:58 PDT 2020


Author: Haojian Wu
Date: 2020-04-24T11:04:40+02:00
New Revision: 500d378ee5064274ed397b2b904e34c7dae496dd

URL: https://github.com/llvm/llvm-project/commit/500d378ee5064274ed397b2b904e34c7dae496dd
DIFF: https://github.com/llvm/llvm-project/commit/500d378ee5064274ed397b2b904e34c7dae496dd.diff

LOG: Fix -Wunused-variable warning, NFC.

Added: 
    

Modified: 
    mlir/lib/IR/AttributeDetail.h

Removed: 
    


################################################################################
diff  --git a/mlir/lib/IR/AttributeDetail.h b/mlir/lib/IR/AttributeDetail.h
index 49995da012e8..93829aed90b6 100644
--- a/mlir/lib/IR/AttributeDetail.h
+++ b/mlir/lib/IR/AttributeDetail.h
@@ -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();


        


More information about the Mlir-commits mailing list