mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 03:33:20 +01:00
Fix test/Regression/CFrontend/2003-11-01-EmptyStructCrash.c
llvm-svn: 18115
This commit is contained in:
parent
731d244a5c
commit
7647235f0f
@ -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