mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 04:30:23 +00:00
Fix test/Regression/CFrontend/2003-11-01-EmptyStructCrash.c
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18115 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b9849700ed
commit
ddc4860c1d
@ -574,6 +574,7 @@ Constant *llvm::ConstantFoldCastInstruction(const Constant *V,
|
||||
const Type *ElTy = PTy->getElementType();
|
||||
while (ElTy != DPTy->getElementType()) {
|
||||
if (const StructType *STy = dyn_cast<StructType>(ElTy)) {
|
||||
if (STy->getNumElements() == 0) break;
|
||||
ElTy = STy->getElementType(0);
|
||||
IdxList.push_back(Constant::getNullValue(Type::UIntTy));
|
||||
} else if (const SequentialType *STy = dyn_cast<SequentialType>(ElTy)) {
|
||||
|
Loading…
Reference in New Issue
Block a user