mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-25 17:20:48 +00:00
Rename alignof -> alignOf to avoid irritating C++'0x compilers,
PR8423, patch by nobled. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117774 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -49,12 +49,12 @@ struct AlignOf {
|
||||
|
||||
};
|
||||
|
||||
/// 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
|
||||
|
@@ -201,7 +201,7 @@ public:
|
||||
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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user