1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00

Simplify some GEP checks in the verifier.

llvm-svn: 149698
This commit is contained in:
Duncan Sands 2012-02-03 17:28:51 +00:00
parent 5c5681cf27
commit 9a1b76b649

View File

@ -1315,11 +1315,9 @@ void Verifier::visitShuffleVectorInst(ShuffleVectorInst &SV) {
}
void Verifier::visitGetElementPtrInst(GetElementPtrInst &GEP) {
Type *TargetTy = GEP.getPointerOperandType();
if (VectorType *VTy = dyn_cast<VectorType>(TargetTy))
TargetTy = VTy->getElementType();
Type *TargetTy = GEP.getPointerOperandType()->getScalarType();
Assert1(dyn_cast<PointerType>(TargetTy),
Assert1(isa<PointerType>(TargetTy),
"GEP base pointer is not a vector or a vector of pointers", &GEP);
Assert1(cast<PointerType>(TargetTy)->getElementType()->isSized(),
"GEP into unsized type!", &GEP);