diff options
author | Anders Carlsson <andersca@mac.com> | 2009-02-05 19:43:10 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-02-05 19:43:10 +0000 |
commit | 96f214776c0f69069fee4d67557c8c7f416009a8 (patch) | |
tree | 68b462fe2367ffdd3d9d9cc7da9c48bbdc260265 /lib/CodeGen/CGExprScalar.cpp | |
parent | 1a6b3686bf5671075c5b217fcfc1840cb0aae172 (diff) |
Follow Eli's advice and store the VLA size with the native size_t type. Fixes PR3491.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63879 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprScalar.cpp')
-rw-r--r-- | lib/CodeGen/CGExprScalar.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/CodeGen/CGExprScalar.cpp b/lib/CodeGen/CGExprScalar.cpp index 44eefea71d..b9dcc078d4 100644 --- a/lib/CodeGen/CGExprScalar.cpp +++ b/lib/CodeGen/CGExprScalar.cpp @@ -685,9 +685,7 @@ ScalarExprEmitter::VisitSizeOfAlignOfExpr(const SizeOfAlignOfExpr *E) { CGF.EmitVLASize(TypeToSize); } - llvm::Value *VLASize = CGF.GetVLASize(VAT); - return Builder.CreateIntCast(VLASize, ConvertType(E->getType()), - false, "conv"); + return CGF.GetVLASize(VAT); } } |