Re-add a slightly more general version of the check from r72578; it is

actually necessary in some obscure cases.

llvm-svn: 72585
This commit is contained in:
Eli Friedman
2009-05-29 19:23:46 +00:00
parent a678874975
commit 9444638e4e
2 changed files with 8 additions and 0 deletions

View File

@@ -487,6 +487,8 @@ llvm::Value *CodeGenFunction::EmitVLASize(QualType Ty)
}
return SizeEntry;
} else if (const ArrayType *AT = dyn_cast<ArrayType>(Ty)) {
EmitVLASize(AT->getElementType());
} else if (const PointerType *PT = Ty->getAsPointerType())
EmitVLASize(PT->getPointeeType());
else {