diff options
author | Chris Lattner <sabre@nondot.org> | 2009-08-14 23:43:22 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-08-14 23:43:22 +0000 |
commit | 881eb9ce336c1fe29cab92c06a1900fccd0951d1 (patch) | |
tree | 5e182385da20bf2778189b10985f89ab299ce53c /lib/CodeGen | |
parent | bbbd98608746f447a442de0b2bb318d9bf5a504d (diff) |
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
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/CGExpr.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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); |