[llvm-commits] [llvm] r66602 - /llvm/trunk/include/llvm/Support/Allocator.h

Mon P Wang wangmp at apple.com
Tue Mar 10 16:49:02 PDT 2009


Author: wangmp
Date: Tue Mar 10 18:48:49 2009
New Revision: 66602

URL: http://llvm.org/viewvc/llvm-project?rev=66602&view=rev
Log:
Changed Allocate to use size_t instead of unsigned.

Modified:
    llvm/trunk/include/llvm/Support/Allocator.h

Modified: llvm/trunk/include/llvm/Support/Allocator.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Allocator.h?rev=66602&r1=66601&r2=66602&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Support/Allocator.h (original)
+++ llvm/trunk/include/llvm/Support/Allocator.h Tue Mar 10 18:48:49 2009
@@ -75,9 +75,9 @@
   /// Allocate space for a specific count of elements and with a specified
   /// alignment.
   template <typename T>
-  T *Allocate(size_t Num, unsigned Alignment) {
+  T *Allocate(size_t Num, size_t Alignment) {
     // Round EltSize up to the specified alignment.
-    unsigned EltSize = (sizeof(T)+Alignment-1)&(-Alignment);
+    size_t EltSize = (sizeof(T)+Alignment-1)&(-Alignment);
     return static_cast<T*>(Allocate(Num * EltSize, Alignment));
   }
 





More information about the llvm-commits mailing list