mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-16 06:49:58 +00:00
have the verifier catch gep's into opaque struct types. PR10473
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136510 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e1cf5902ec
commit
4cea5bae82
@ -1288,6 +1288,10 @@ void Verifier::visitShuffleVectorInst(ShuffleVectorInst &SV) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Verifier::visitGetElementPtrInst(GetElementPtrInst &GEP) {
|
void Verifier::visitGetElementPtrInst(GetElementPtrInst &GEP) {
|
||||||
|
Assert1(cast<PointerType>(GEP.getOperand(0)->getType())
|
||||||
|
->getElementType()->isSized(),
|
||||||
|
"GEP into unsized type!", &GEP);
|
||||||
|
|
||||||
SmallVector<Value*, 16> Idxs(GEP.idx_begin(), GEP.idx_end());
|
SmallVector<Value*, 16> Idxs(GEP.idx_begin(), GEP.idx_end());
|
||||||
Type *ElTy =
|
Type *ElTy =
|
||||||
GetElementPtrInst::getIndexedType(GEP.getOperand(0)->getType(), Idxs);
|
GetElementPtrInst::getIndexedType(GEP.getOperand(0)->getType(), Idxs);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user