summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-10-30 05:14:01 +0000
committerChris Lattner <sabre@nondot.org>2010-10-30 05:14:01 +0000
commitfa898b2b24a5381fe3dcae1f2ce882bad04d9fee (patch)
tree3404d76d9636b43ddd367c77cea8ea1c33c998d8
parentde30afc3d929ed88db88a8c4a719232ae2d3a678 (diff)
downloadbcm5719-llvm-fa898b2b24a5381fe3dcae1f2ce882bad04d9fee.tar.gz
bcm5719-llvm-fa898b2b24a5381fe3dcae1f2ce882bad04d9fee.zip
Rename alignof -> alignOf to avoid irritating C++'0x compilers,
PR8423, patch by nobled. llvm-svn: 117774
-rw-r--r--llvm/include/llvm/ADT/StringMap.h2
-rw-r--r--llvm/include/llvm/CodeGen/SlotIndexes.h2
-rw-r--r--llvm/include/llvm/Support/AlignOf.h6
-rw-r--r--llvm/include/llvm/Support/Allocator.h2
4 files changed, 6 insertions, 6 deletions
diff --git a/llvm/include/llvm/ADT/StringMap.h b/llvm/include/llvm/ADT/StringMap.h
index 4d8dd64b0bb..d047a420790 100644
--- a/llvm/include/llvm/ADT/StringMap.h
+++ b/llvm/include/llvm/ADT/StringMap.h
@@ -167,7 +167,7 @@ public:
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));
diff --git a/llvm/include/llvm/CodeGen/SlotIndexes.h b/llvm/include/llvm/CodeGen/SlotIndexes.h
index 98426f019c1..4b7721b996d 100644
--- a/llvm/include/llvm/CodeGen/SlotIndexes.h
+++ b/llvm/include/llvm/CodeGen/SlotIndexes.h
@@ -393,7 +393,7 @@ namespace llvm {
IndexListEntry *entry =
static_cast<IndexListEntry*>(
ileAllocator.Allocate(sizeof(IndexListEntry),
- alignof<IndexListEntry>()));
+ alignOf<IndexListEntry>()));
new (entry) IndexListEntry(mi, index);
diff --git a/llvm/include/llvm/Support/AlignOf.h b/llvm/include/llvm/Support/AlignOf.h
index 6a7a1a6bd22..979e5975aa0 100644
--- a/llvm/include/llvm/Support/AlignOf.h
+++ b/llvm/include/llvm/Support/AlignOf.h
@@ -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
diff --git a/llvm/include/llvm/Support/Allocator.h b/llvm/include/llvm/Support/Allocator.h
index 0b7151a72c1..f3c53d14e5a 100644
--- a/llvm/include/llvm/Support/Allocator.h
+++ b/llvm/include/llvm/Support/Allocator.h
@@ -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();
}
OpenPOWER on IntegriCloud