[llvm-branch-commits] [llvm-branch] r133505 - /llvm/branches/type-system-rewrite/lib/VMCore/Type.cpp

Chris Lattner sabre at nondot.org
Mon Jun 20 23:33:25 PDT 2011


Author: lattner
Date: Tue Jun 21 01:33:25 2011
New Revision: 133505

URL: http://llvm.org/viewvc/llvm-project?rev=133505&view=rev
Log:
fix obvious thinko

Modified:
    llvm/branches/type-system-rewrite/lib/VMCore/Type.cpp

Modified: llvm/branches/type-system-rewrite/lib/VMCore/Type.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/type-system-rewrite/lib/VMCore/Type.cpp?rev=133505&r1=133504&r2=133505&view=diff
==============================================================================
--- llvm/branches/type-system-rewrite/lib/VMCore/Type.cpp (original)
+++ llvm/branches/type-system-rewrite/lib/VMCore/Type.cpp Tue Jun 21 01:33:25 2011
@@ -400,7 +400,7 @@
     setSubclassData(getSubclassData() | SCDB_Packed);
   
   Type **Elts = new Type*[Elements.size()];
-  memcpy(Elts, Elements.data(), sizeof(Elements[0])*sizeof(Type*));
+  memcpy(Elts, Elements.data(), sizeof(Elements[0])*Elements.size());
   
   ContainedTys = Elts;
   NumContainedTys = Elements.size();





More information about the llvm-branch-commits mailing list