[cfe-commits] r94579 - /cfe/trunk/lib/CodeGen/CGExprCXX.cpp

Ken Dyck ken.dyck at onsemi.com
Tue Jan 26 11:59:28 PST 2010


Author: kjdyck
Date: Tue Jan 26 13:59:28 2010
New Revision: 94579

URL: http://llvm.org/viewvc/llvm-project?rev=94579&view=rev
Log:
Convert one last size variable to CharUnits (follow-on to 94577).

Modified:
    cfe/trunk/lib/CodeGen/CGExprCXX.cpp

Modified: cfe/trunk/lib/CodeGen/CGExprCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExprCXX.cpp?rev=94579&r1=94578&r2=94579&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGExprCXX.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExprCXX.cpp Tue Jan 26 13:59:28 2010
@@ -656,8 +656,9 @@
   QualType SizeTy;
   if (DeleteFTy->getNumArgs() == 2) {
     SizeTy = DeleteFTy->getArgType(1);
-    uint64_t DeleteTypeSize = getContext().getTypeSize(DeleteTy) / 8;
-    Size = llvm::ConstantInt::get(ConvertType(SizeTy), DeleteTypeSize);
+    CharUnits DeleteTypeSize = getContext().getTypeSizeInChars(DeleteTy);
+    Size = llvm::ConstantInt::get(ConvertType(SizeTy), 
+                                  DeleteTypeSize.getQuantity());
   }
   
   if (DeleteFD->getOverloadedOperator() == OO_Array_Delete &&





More information about the cfe-commits mailing list