]> granicus.if.org Git - clang/commitdiff
Fixup codegen for composition of vla types using a normal array type.
authorMike Stump <mrs@apple.com>
Fri, 29 May 2009 17:06:45 +0000 (17:06 +0000)
committerMike Stump <mrs@apple.com>
Fri, 29 May 2009 17:06:45 +0000 (17:06 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72578 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CodeGenFunction.cpp

index 04661fca471c96cb462aa6c0417bc9822a5bc6b6..38a981ccff16f58818de396d0da4c4df2948d4f4 100644 (file)
@@ -487,6 +487,8 @@ llvm::Value *CodeGenFunction::EmitVLASize(QualType Ty)
     }
     
     return SizeEntry;
+  } else if (const ConstantArrayType *CAT = dyn_cast<ConstantArrayType>(Ty)) {
+    EmitVLASize(CAT->getElementType());
   } else if (const PointerType *PT = Ty->getAsPointerType())
     EmitVLASize(PT->getPointeeType());
   else {