mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 04:30:12 +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) {
|
||||
Assert1(cast<PointerType>(GEP.getOperand(0)->getType())
|
||||
->getElementType()->isSized(),
|
||||
"GEP into unsized type!", &GEP);
|
||||
|
||||
SmallVector<Value*, 16> Idxs(GEP.idx_begin(), GEP.idx_end());
|
||||
Type *ElTy =
|
||||
GetElementPtrInst::getIndexedType(GEP.getOperand(0)->getType(), Idxs);
|
||||
|
Loading…
Reference in New Issue
Block a user