use GetVLASize instead of accessing VLASizeMap directly, this gets an assert if

VLASize isn't populated for the type yet.

llvm-svn: 79057
This commit is contained in:
Chris Lattner 2009-08-14 23:43:22 +00:00
parent 312fde6420
commit 19efdd67dd
1 changed files with 1 additions and 1 deletions

View File

@ -887,7 +887,7 @@ LValue CodeGenFunction::EmitArraySubscriptExpr(const ArraySubscriptExpr *E) {
llvm::Value *Address = 0;
if (const VariableArrayType *VAT =
getContext().getAsVariableArrayType(E->getType())) {
llvm::Value *VLASize = VLASizeMap[VAT];
llvm::Value *VLASize = GetVLASize(VAT);
Idx = Builder.CreateMul(Idx, VLASize);