mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-19 19:29:31 +00:00
Fix PR905 and InstCombine/2006-09-11-EmptyStructCrash.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30266 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c42354904e
commit
63d3220dae
@ -5187,7 +5187,8 @@ Instruction *InstCombiner::visitCastInst(CastInst &CI) {
|
||||
Constant *ZeroUInt = Constant::getNullValue(Type::UIntTy);
|
||||
unsigned NumZeros = 0;
|
||||
while (SrcTy != DstTy &&
|
||||
isa<CompositeType>(SrcTy) && !isa<PointerType>(SrcTy)) {
|
||||
isa<CompositeType>(SrcTy) && !isa<PointerType>(SrcTy) &&
|
||||
SrcTy->getNumContainedTypes() /* not "{}" */) {
|
||||
SrcTy = cast<CompositeType>(SrcTy)->getTypeAtIndex(ZeroUInt);
|
||||
++NumZeros;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user