summaryrefslogtreecommitdiff
blob: a15f118caee67801d98dc14fb33f9a87a7f5643d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
Index: include/llvm/ADT/StringMap.h
===================================================================
--- include/llvm/ADT/StringMap.h	(révision 117773)
+++ include/llvm/ADT/StringMap.h	(révision 117774)
@@ -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));
Index: include/llvm/Support/AlignOf.h
===================================================================
--- include/llvm/Support/AlignOf.h	(révision 117773)
+++ include/llvm/Support/AlignOf.h	(révision 117774)
@@ -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
Index: include/llvm/Support/Allocator.h
===================================================================
--- include/llvm/Support/Allocator.h	(révision 117773)
+++ include/llvm/Support/Allocator.h	(révision 117774)
@@ -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();
       }
Index: include/llvm/CodeGen/SlotIndexes.h
===================================================================
--- include/llvm/CodeGen/SlotIndexes.h	(révision 117773)
+++ include/llvm/CodeGen/SlotIndexes.h	(révision 117774)
@@ -393,7 +393,7 @@
       IndexListEntry *entry =
         static_cast<IndexListEntry*>(
           ileAllocator.Allocate(sizeof(IndexListEntry),
-          alignof<IndexListEntry>()));
+          alignOf<IndexListEntry>()));
 
       new (entry) IndexListEntry(mi, index);
 
Index: tools/clang/lib/Basic/IdentifierTable.cpp
===================================================================
--- tools/clang/lib/Basic/IdentifierTable.cpp	(révision 117774)
+++ tools/clang/lib/Basic/IdentifierTable.cpp	(révision 117775)
@@ -390,7 +390,7 @@
   unsigned Size = sizeof(MultiKeywordSelector) + nKeys*sizeof(IdentifierInfo *);
   MultiKeywordSelector *SI =
     (MultiKeywordSelector*)SelTabImpl.Allocator.Allocate(Size,
-                                         llvm::alignof<MultiKeywordSelector>());
+                                         llvm::alignOf<MultiKeywordSelector>());
   new (SI) MultiKeywordSelector(nKeys, IIV);
   SelTabImpl.Table.InsertNode(SI, InsertPos);
   return Selector(SI);
Index: tools/clang/lib/AST/ExprCXX.cpp
===================================================================
--- tools/clang/lib/AST/ExprCXX.cpp	(révision 117774)
+++ tools/clang/lib/AST/ExprCXX.cpp	(révision 117775)
@@ -233,7 +233,7 @@
   if (NumTemplateArgs != 0)
     size += ExplicitTemplateArgumentList::sizeFor(NumTemplateArgs);
 
-  void *Mem = C.Allocate(size, llvm::alignof<UnresolvedLookupExpr>());
+  void *Mem = C.Allocate(size, llvm::alignOf<UnresolvedLookupExpr>());
   UnresolvedLookupExpr *E = new (Mem) UnresolvedLookupExpr(EmptyShell());
   E->HasExplicitTemplateArgs = NumTemplateArgs != 0;
   return E;
@@ -261,7 +261,7 @@
   if (NumResults) {
     Results = static_cast<DeclAccessPair *>(
                                 C.Allocate(sizeof(DeclAccessPair) * NumResults, 
-                                           llvm::alignof<DeclAccessPair>()));
+                                           llvm::alignOf<DeclAccessPair>()));
     memcpy(Results, &*Begin.getIterator(), 
            NumResults * sizeof(DeclAccessPair));
   }
@@ -737,7 +737,7 @@
   if (TemplateArgs)
     size += ExplicitTemplateArgumentList::sizeFor(*TemplateArgs);
 
-  void *Mem = C.Allocate(size, llvm::alignof<CXXDependentScopeMemberExpr>());
+  void *Mem = C.Allocate(size, llvm::alignOf<CXXDependentScopeMemberExpr>());
   return new (Mem) CXXDependentScopeMemberExpr(C, Base, BaseType,
                                                IsArrow, OperatorLoc,
                                                Qualifier, QualifierRange,
@@ -756,7 +756,7 @@
 
   std::size_t size = sizeof(CXXDependentScopeMemberExpr) +
                      ExplicitTemplateArgumentList::sizeFor(NumTemplateArgs);
-  void *Mem = C.Allocate(size, llvm::alignof<CXXDependentScopeMemberExpr>());
+  void *Mem = C.Allocate(size, llvm::alignOf<CXXDependentScopeMemberExpr>());
   CXXDependentScopeMemberExpr *E
     =  new (Mem) CXXDependentScopeMemberExpr(C, 0, QualType(),
                                              0, SourceLocation(), 0,
@@ -812,7 +812,7 @@
   if (TemplateArgs)
     size += ExplicitTemplateArgumentList::sizeFor(*TemplateArgs);
 
-  void *Mem = C.Allocate(size, llvm::alignof<UnresolvedMemberExpr>());
+  void *Mem = C.Allocate(size, llvm::alignOf<UnresolvedMemberExpr>());
   return new (Mem) UnresolvedMemberExpr(C, 
                              Dependent ? C.DependentTy : C.OverloadTy,
                              Dependent, HasUnresolvedUsing, Base, BaseType,
@@ -826,7 +826,7 @@
   if (NumTemplateArgs != 0)
     size += ExplicitTemplateArgumentList::sizeFor(NumTemplateArgs);
 
-  void *Mem = C.Allocate(size, llvm::alignof<UnresolvedMemberExpr>());
+  void *Mem = C.Allocate(size, llvm::alignOf<UnresolvedMemberExpr>());
   UnresolvedMemberExpr *E = new (Mem) UnresolvedMemberExpr(EmptyShell());
   E->HasExplicitTemplateArgs = NumTemplateArgs != 0;
   return E;
Index: tools/clang/lib/AST/DeclObjC.cpp
===================================================================
--- tools/clang/lib/AST/DeclObjC.cpp	(révision 117774)
+++ tools/clang/lib/AST/DeclObjC.cpp	(révision 117775)
@@ -711,7 +711,7 @@
 void ObjCClassDecl::setClassList(ASTContext &C, ObjCInterfaceDecl*const*List,
                                  const SourceLocation *Locs, unsigned Num) {
   ForwardDecls = (ObjCClassRef*) C.Allocate(sizeof(ObjCClassRef)*Num,
-                                            llvm::alignof<ObjCClassRef>());
+                                            llvm::alignOf<ObjCClassRef>());
   for (unsigned i = 0; i < Num; ++i)
     new (&ForwardDecls[i]) ObjCClassRef(List[i], Locs[i]);
   
Index: tools/clang/lib/AST/Stmt.cpp
===================================================================
--- tools/clang/lib/AST/Stmt.cpp	(révision 117774)
+++ tools/clang/lib/AST/Stmt.cpp	(révision 117775)
@@ -416,7 +416,7 @@
                                      Stmt *atFinallyStmt) {
   unsigned Size = sizeof(ObjCAtTryStmt) + 
     (1 + NumCatchStmts + (atFinallyStmt != 0)) * sizeof(Stmt *);
-  void *Mem = Context.Allocate(Size, llvm::alignof<ObjCAtTryStmt>());
+  void *Mem = Context.Allocate(Size, llvm::alignOf<ObjCAtTryStmt>());
   return new (Mem) ObjCAtTryStmt(atTryLoc, atTryStmt, CatchStmts, NumCatchStmts,
                                  atFinallyStmt);
 }
@@ -426,7 +426,7 @@
                                                  bool HasFinally) {
   unsigned Size = sizeof(ObjCAtTryStmt) + 
     (1 + NumCatchStmts + HasFinally) * sizeof(Stmt *);
-  void *Mem = Context.Allocate(Size, llvm::alignof<ObjCAtTryStmt>());
+  void *Mem = Context.Allocate(Size, llvm::alignOf<ObjCAtTryStmt>());
   return new (Mem) ObjCAtTryStmt(EmptyShell(), NumCatchStmts, HasFinally);  
 }
 
@@ -448,7 +448,7 @@
   std::size_t Size = sizeof(CXXTryStmt);
   Size += ((numHandlers + 1) * sizeof(Stmt));
 
-  void *Mem = C.Allocate(Size, llvm::alignof<CXXTryStmt>());
+  void *Mem = C.Allocate(Size, llvm::alignOf<CXXTryStmt>());
   return new (Mem) CXXTryStmt(tryLoc, tryBlock, handlers, numHandlers);
 }
 
@@ -457,7 +457,7 @@
   std::size_t Size = sizeof(CXXTryStmt);
   Size += ((numHandlers + 1) * sizeof(Stmt));
 
-  void *Mem = C.Allocate(Size, llvm::alignof<CXXTryStmt>());
+  void *Mem = C.Allocate(Size, llvm::alignOf<CXXTryStmt>());
   return new (Mem) CXXTryStmt(Empty, numHandlers);
 }
 
Index: tools/clang/lib/AST/Expr.cpp
===================================================================
--- tools/clang/lib/AST/Expr.cpp	(révision 117774)
+++ tools/clang/lib/AST/Expr.cpp	(révision 117775)
@@ -257,7 +257,7 @@
   if (TemplateArgs)
     Size += ExplicitTemplateArgumentList::sizeFor(*TemplateArgs);
   
-  void *Mem = Context.Allocate(Size, llvm::alignof<DeclRefExpr>());
+  void *Mem = Context.Allocate(Size, llvm::alignOf<DeclRefExpr>());
   return new (Mem) DeclRefExpr(Qualifier, QualifierRange, D, NameInfo,
                                TemplateArgs, T);
 }
@@ -271,7 +271,7 @@
   if (NumTemplateArgs)
     Size += ExplicitTemplateArgumentList::sizeFor(NumTemplateArgs);
   
-  void *Mem = Context.Allocate(Size, llvm::alignof<DeclRefExpr>());
+  void *Mem = Context.Allocate(Size, llvm::alignOf<DeclRefExpr>());
   return new (Mem) DeclRefExpr(EmptyShell());
 }
 
@@ -432,7 +432,7 @@
   // any concatenated string tokens.
   void *Mem = C.Allocate(sizeof(StringLiteral)+
                          sizeof(SourceLocation)*(NumStrs-1),
-                         llvm::alignof<StringLiteral>());
+                         llvm::alignOf<StringLiteral>());
   StringLiteral *SL = new (Mem) StringLiteral(Ty);
 
   // OPTIMIZE: could allocate this appended to the StringLiteral.
@@ -452,7 +452,7 @@
 StringLiteral *StringLiteral::CreateEmpty(ASTContext &C, unsigned NumStrs) {
   void *Mem = C.Allocate(sizeof(StringLiteral)+
                          sizeof(SourceLocation)*(NumStrs-1),
-                         llvm::alignof<StringLiteral>());
+                         llvm::alignOf<StringLiteral>());
   StringLiteral *SL = new (Mem) StringLiteral(QualType());
   SL->StrData = 0;
   SL->ByteLength = 0;
@@ -714,7 +714,7 @@
   if (targs)
     Size += ExplicitTemplateArgumentList::sizeFor(*targs);
 
-  void *Mem = C.Allocate(Size, llvm::alignof<MemberExpr>());
+  void *Mem = C.Allocate(Size, llvm::alignOf<MemberExpr>());
   MemberExpr *E = new (Mem) MemberExpr(base, isarrow, memberdecl, nameinfo, ty);
 
   if (hasQualOrFound) {
Index: tools/clang/lib/AST/DeclCXX.cpp
===================================================================
--- tools/clang/lib/AST/DeclCXX.cpp	(révision 117774)
+++ tools/clang/lib/AST/DeclCXX.cpp	(révision 117775)
@@ -1057,7 +1057,7 @@
                                    unsigned NumIndices) {
   void *Mem = Context.Allocate(sizeof(CXXBaseOrMemberInitializer) +
                                sizeof(VarDecl *) * NumIndices,
-                               llvm::alignof<CXXBaseOrMemberInitializer>());
+                               llvm::alignOf<CXXBaseOrMemberInitializer>());
   return new (Mem) CXXBaseOrMemberInitializer(Context, Member, MemberLoc,
                                               L, Init, R, Indices, NumIndices);
 }
Index: tools/clang/lib/Lex/TokenLexer.cpp
===================================================================
--- tools/clang/lib/Lex/TokenLexer.cpp	(révision 117774)
+++ tools/clang/lib/Lex/TokenLexer.cpp	(révision 117775)
@@ -287,7 +287,7 @@
     llvm::BumpPtrAllocator &Alloc = PP.getPreprocessorAllocator();
     Token *Res =
       static_cast<Token *>(Alloc.Allocate(sizeof(Token)*ResultToks.size(),
-                                          llvm::alignof<Token>()));
+                                          llvm::alignOf<Token>()));
     if (NumTokens)
       memcpy(Res, &ResultToks[0], NumTokens*sizeof(Token));
     Tokens = Res;