... | ... |
@@ -167,7 +167,7 @@ public: |
167 | 167 |
|
168 | 168 |
unsigned AllocSize = static_cast<unsigned>(sizeof(StringMapEntry))+ |
169 | 169 |
KeyLength+1; |
170 |
- unsigned Alignment = alignof<StringMapEntry>(); |
|
170 |
+ unsigned Alignment = alignofLLVM<StringMapEntry>(); |
|
171 | 171 |
|
172 | 172 |
StringMapEntry *NewItem = |
173 | 173 |
static_cast<StringMapEntry*>(Allocator.Allocate(AllocSize,Alignment)); |
... | ... |
@@ -415,7 +415,7 @@ namespace llvm { |
415 | 415 |
IndexListEntry *entry = |
416 | 416 |
static_cast<IndexListEntry*>( |
417 | 417 |
ileAllocator.Allocate(sizeof(IndexListEntry), |
418 |
- alignof<IndexListEntry>())); |
|
418 |
+ alignofLLVM<IndexListEntry>())); |
|
419 | 419 |
|
420 | 420 |
new (entry) IndexListEntry(mi, index); |
421 | 421 |
|
... | ... |
@@ -49,12 +49,13 @@ struct AlignOf { |
49 | 49 |
|
50 | 50 |
}; |
51 | 51 |
|
52 |
+// This is a built in function in C++11. We have to rename this. |
|
52 | 53 |
/// alignof - A templated function that returns the mininum alignment of |
53 | 54 |
/// of a type. This provides no extra functionality beyond the AlignOf |
54 | 55 |
/// class besides some cosmetic cleanliness. Example usage: |
55 | 56 |
/// alignof<int>() returns the alignment of an int. |
56 | 57 |
template <typename T> |
57 |
-static inline unsigned alignof() { return AlignOf<T>::Alignment; } |
|
58 |
+static inline unsigned alignofLLVM() { return AlignOf<T>::Alignment; } |
|
58 | 59 |
|
59 | 60 |
} // end namespace llvm |
60 | 61 |
#endif |
... | ... |
@@ -201,7 +201,7 @@ public: |
201 | 201 |
char *End = Slab == Allocator.CurSlab ? Allocator.CurPtr : |
202 | 202 |
(char *)Slab + Slab->Size; |
203 | 203 |
for (char *Ptr = (char*)(Slab+1); Ptr < End; Ptr += sizeof(T)) { |
204 |
- Ptr = Allocator.AlignPtr(Ptr, alignof<T>()); |
|
204 |
+ Ptr = Allocator.AlignPtr(Ptr, alignofLLVM<T>()); |
|
205 | 205 |
if (Ptr + sizeof(T) <= End) |
206 | 206 |
reinterpret_cast<T*>(Ptr)->~T(); |
207 | 207 |
} |