From 4fc56d70aadea9df88e7bf408e2e203dc79ff8e6 Mon Sep 17 00:00:00 2001 From: Mehdi Amini Date: Wed, 19 Aug 2020 17:13:28 +0000 Subject: Revert "[NFC][llvm] Make the contructors of `ElementCount` private." This reverts commit 264afb9e6aebc98c353644dd0700bec808501cab. (and dependent 6b742cc48 and fc53bd610f) MLIR/Flang are broken. --- llvm/lib/IR/ConstantFold.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'llvm/lib/IR/ConstantFold.cpp') diff --git a/llvm/lib/IR/ConstantFold.cpp b/llvm/lib/IR/ConstantFold.cpp index e5c4250..2d3afca 100644 --- a/llvm/lib/IR/ConstantFold.cpp +++ b/llvm/lib/IR/ConstantFold.cpp @@ -919,8 +919,7 @@ Constant *llvm::ConstantFoldShuffleVectorInstruction(Constant *V1, Constant *V2, ArrayRef Mask) { auto *V1VTy = cast(V1->getType()); unsigned MaskNumElts = Mask.size(); - auto MaskEltCount = - ElementCount::get(MaskNumElts, isa(V1VTy)); + ElementCount MaskEltCount = {MaskNumElts, isa(V1VTy)}; Type *EltTy = V1VTy->getElementType(); // Undefined shuffle mask -> undefined value. -- cgit v1.1