Fix build failures caused by f4257c5832

This commit is contained in:
David Sherwood 2020-08-28 14:56:01 +01:00
parent f4257c5832
commit 4b1a55a92f
1 changed files with 4 additions and 4 deletions

View File

@ -183,14 +183,14 @@ Type Importer::getStdTypeForAttr(LLVMType type) {
// LLVM vectors can only contain scalars.
if (type.isVectorTy()) {
auto numElements = type.getVectorElementCount();
if (numElements.Scalable) {
if (numElements.isScalable()) {
emitError(unknownLoc) << "scalable vectors not supported";
return nullptr;
}
Type elementType = getStdTypeForAttr(type.getVectorElementType());
if (!elementType)
return nullptr;
return VectorType::get(numElements.Min, elementType);
return VectorType::get(numElements.getKnownMinValue(), elementType);
}
// LLVM arrays can contain other arrays or vectors.
@ -208,11 +208,11 @@ Type Importer::getStdTypeForAttr(LLVMType type) {
if (type.getArrayElementType().isVectorTy()) {
LLVMType vectorType = type.getArrayElementType();
auto numElements = vectorType.getVectorElementCount();
if (numElements.Scalable) {
if (numElements.isScalable()) {
emitError(unknownLoc) << "scalable vectors not supported";
return nullptr;
}
shape.push_back(numElements.Min);
shape.push_back(numElements.getKnownMinValue());
Type elementType = getStdTypeForAttr(vectorType.getVectorElementType());
if (!elementType)