[llvm-branch-commits] [llvm-branch] r117806 - in /llvm/branches/Apple/whitney/include/llvm: ADT/StringMap.h CodeGen/SlotIndexes.h Support/AlignOf.h Support/Allocator.h

Daniel Dunbar daniel at zuster.org
Sat Oct 30 10:20:35 PDT 2010


Author: ddunbar
Date: Sat Oct 30 12:20:35 2010
New Revision: 117806

URL: http://llvm.org/viewvc/llvm-project?rev=117806&view=rev
Log:
Merge r117774:
--
Author: Chris Lattner <clattner at apple.com>
Date:   Sat Oct 30 05:14:01 2010 +0000

    Rename alignof -> alignOf to avoid irritating C++'0x compilers,
    PR8423, patch by nobled.

Modified:
    llvm/branches/Apple/whitney/include/llvm/ADT/StringMap.h
    llvm/branches/Apple/whitney/include/llvm/CodeGen/SlotIndexes.h
    llvm/branches/Apple/whitney/include/llvm/Support/AlignOf.h
    llvm/branches/Apple/whitney/include/llvm/Support/Allocator.h

Modified: llvm/branches/Apple/whitney/include/llvm/ADT/StringMap.h
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/whitney/include/llvm/ADT/StringMap.h?rev=117806&r1=117805&r2=117806&view=diff
==============================================================================
--- llvm/branches/Apple/whitney/include/llvm/ADT/StringMap.h (original)
+++ llvm/branches/Apple/whitney/include/llvm/ADT/StringMap.h Sat Oct 30 12:20:35 2010
@@ -167,7 +167,7 @@
 
     unsigned AllocSize = static_cast<unsigned>(sizeof(StringMapEntry))+
       KeyLength+1;
-    unsigned Alignment = alignof<StringMapEntry>();
+    unsigned Alignment = alignOf<StringMapEntry>();
 
     StringMapEntry *NewItem =
       static_cast<StringMapEntry*>(Allocator.Allocate(AllocSize,Alignment));

Modified: llvm/branches/Apple/whitney/include/llvm/CodeGen/SlotIndexes.h
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/whitney/include/llvm/CodeGen/SlotIndexes.h?rev=117806&r1=117805&r2=117806&view=diff
==============================================================================
--- llvm/branches/Apple/whitney/include/llvm/CodeGen/SlotIndexes.h (original)
+++ llvm/branches/Apple/whitney/include/llvm/CodeGen/SlotIndexes.h Sat Oct 30 12:20:35 2010
@@ -393,7 +393,7 @@
       IndexListEntry *entry =
         static_cast<IndexListEntry*>(
           ileAllocator.Allocate(sizeof(IndexListEntry),
-          alignof<IndexListEntry>()));
+          alignOf<IndexListEntry>()));
 
       new (entry) IndexListEntry(mi, index);
 

Modified: llvm/branches/Apple/whitney/include/llvm/Support/AlignOf.h
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/whitney/include/llvm/Support/AlignOf.h?rev=117806&r1=117805&r2=117806&view=diff
==============================================================================
--- llvm/branches/Apple/whitney/include/llvm/Support/AlignOf.h (original)
+++ llvm/branches/Apple/whitney/include/llvm/Support/AlignOf.h Sat Oct 30 12:20:35 2010
@@ -49,12 +49,12 @@
 
 };
 
-/// alignof - A templated function that returns the mininum alignment of
+/// alignOf - A templated function that returns the mininum alignment of
 ///  of a type.  This provides no extra functionality beyond the AlignOf
 ///  class besides some cosmetic cleanliness.  Example usage:
-///  alignof<int>() returns the alignment of an int.
+///  alignOf<int>() returns the alignment of an int.
 template <typename T>
-static inline unsigned alignof() { return AlignOf<T>::Alignment; }
+static inline unsigned alignOf() { return AlignOf<T>::Alignment; }
 
 } // end namespace llvm
 #endif

Modified: llvm/branches/Apple/whitney/include/llvm/Support/Allocator.h
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/whitney/include/llvm/Support/Allocator.h?rev=117806&r1=117805&r2=117806&view=diff
==============================================================================
--- llvm/branches/Apple/whitney/include/llvm/Support/Allocator.h (original)
+++ llvm/branches/Apple/whitney/include/llvm/Support/Allocator.h Sat Oct 30 12:20:35 2010
@@ -201,7 +201,7 @@
       char *End = Slab == Allocator.CurSlab ? Allocator.CurPtr :
                                               (char *)Slab + Slab->Size;
       for (char *Ptr = (char*)(Slab+1); Ptr < End; Ptr += sizeof(T)) {
-        Ptr = Allocator.AlignPtr(Ptr, alignof<T>());
+        Ptr = Allocator.AlignPtr(Ptr, alignOf<T>());
         if (Ptr + sizeof(T) <= End)
           reinterpret_cast<T*>(Ptr)->~T();
       }





More information about the llvm-branch-commits mailing list