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);
}
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]);
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);
}
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());
}
// 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.
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;
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) {
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;
if (NumResults) {
Results = static_cast<DeclAccessPair *>(
C.Allocate(sizeof(DeclAccessPair) * NumResults,
- llvm::alignof<DeclAccessPair>()));
+ llvm::alignOf<DeclAccessPair>()));
memcpy(Results, &*Begin.getIterator(),
NumResults * sizeof(DeclAccessPair));
}
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,
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,
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,
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;
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);
}
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);
}
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);
}
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);
}
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);
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;