From: Chris Lattner Date: Fri, 14 Aug 2009 23:43:22 +0000 (+0000) Subject: use GetVLASize instead of accessing VLASizeMap directly, this gets an assert if X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=881eb9ce336c1fe29cab92c06a1900fccd0951d1;p=clang use GetVLASize instead of accessing VLASizeMap directly, this gets an assert if VLASize isn't populated for the type yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79057 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp index 7ce1354ee0..d806fb3b72 100644 --- a/lib/CodeGen/CGExpr.cpp +++ b/lib/CodeGen/CGExpr.cpp @@ -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);