aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/Constants.cpp
diff options
context:
space:
mode:
authorMehdi Amini <joker.eph@gmail.com>2020-08-19 17:26:36 +0000
committerMehdi Amini <joker.eph@gmail.com>2020-08-19 17:26:36 +0000
commita407ec9b6db1e29e9aa361819f499ad11038d2dd (patch)
treec79769dcf2b4f735484b238d909b8285b469b15a /llvm/lib/IR/Constants.cpp
parent2d83014c469153b4e79bb85d110b026d9f3c5664 (diff)
downloadllvm-a407ec9b6db1e29e9aa361819f499ad11038d2dd.zip
llvm-a407ec9b6db1e29e9aa361819f499ad11038d2dd.tar.gz
llvm-a407ec9b6db1e29e9aa361819f499ad11038d2dd.tar.bz2
Revert "Revert "[NFC][llvm] Make the contructors of `ElementCount` private.""
Was reverted because MLIR/Flang builds were broken, these APIs have been fixed in the meantime.
Diffstat (limited to 'llvm/lib/IR/Constants.cpp')
-rw-r--r--llvm/lib/IR/Constants.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/IR/Constants.cpp b/llvm/lib/IR/Constants.cpp
index cbbcca2..b252ef7 100644
--- a/llvm/lib/IR/Constants.cpp
+++ b/llvm/lib/IR/Constants.cpp
@@ -2245,7 +2245,7 @@ Constant *ConstantExpr::getGetElementPtr(Type *Ty, Constant *C,
unsigned AS = C->getType()->getPointerAddressSpace();
Type *ReqTy = DestTy->getPointerTo(AS);
- ElementCount EltCount = {0, false};
+ auto EltCount = ElementCount::getFixed(0);
if (VectorType *VecTy = dyn_cast<VectorType>(C->getType()))
EltCount = VecTy->getElementCount();
else
@@ -2938,7 +2938,7 @@ Constant *ConstantDataVector::getSplat(unsigned NumElts, Constant *V) {
return getFP(V->getType(), Elts);
}
}
- return ConstantVector::getSplat({NumElts, false}, V);
+ return ConstantVector::getSplat(ElementCount::getFixed(NumElts), V);
}