if (!Vec->getType()->isVectorTy())
return error("Invalid type for value");
I = ExtractElementInst::Create(Vec, Idx);
- FullTy = FullTy->getVectorElementType();
+ FullTy = cast<VectorType>(FullTy)->getElementType();
InstructionList.push_back(I);
break;
}
return error("Invalid type for value");
I = new ShuffleVectorInst(Vec1, Vec2, Mask);
- FullTy = VectorType::get(FullTy->getVectorElementType(),
- Mask->getType()->getVectorElementCount());
+ FullTy =
+ VectorType::get(cast<VectorType>(FullTy)->getElementType(),
+ cast<VectorType>(Mask->getType())->getElementCount());
InstructionList.push_back(I);
break;
}
!FullTy->isPointerTy() && !isa<StructType>(FullTy) &&
!isa<ArrayType>(FullTy) &&
(!isa<VectorType>(FullTy) ||
- FullTy->getVectorElementType()->isFloatingPointTy() ||
- FullTy->getVectorElementType()->isIntegerTy()) &&
+ cast<VectorType>(FullTy)->getElementType()->isFloatingPointTy() ||
+ cast<VectorType>(FullTy)->getElementType()->isIntegerTy()) &&
"Structured types must be assigned with corresponding non-opaque "
"pointer type");
}