[cfe-commits] r63394 - in /cfe/trunk: lib/CodeGen/CGExprScalar.cpp test/CodeGen/sizeof-vla.c
Eli Friedman
eli.friedman at gmail.com
Fri Jan 30 09:31:07 PST 2009
On Fri, Jan 30, 2009 at 8:41 AM, Anders Carlsson <andersca at mac.com> wrote:
> @@ -684,7 +684,10 @@
> // sizeof(type) - make sure to emit the VLA size.
> CGF.EmitVLASize(TypeToSize);
> }
> - return CGF.GetVLASize(VAT);
> +
> + llvm::Value *VLASize = CGF.GetVLASize(VAT);
> + return Builder.CreateIntCast(VLASize, ConvertType(E->getType()),
> + false, "conv");
> }
> }
This seems like a relatively late place to put the cast; we should be
computing the size in type size_t, I think. Are you sure there isn't
a missing cast earlier?
-Eli
More information about the cfe-commits
mailing list