diff options
Diffstat (limited to 'clang/lib/AST/Expr.cpp')
-rw-r--r-- | clang/lib/AST/Expr.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/clang/lib/AST/Expr.cpp b/clang/lib/AST/Expr.cpp index 15386aeec9d..50dd59d6f33 100644 --- a/clang/lib/AST/Expr.cpp +++ b/clang/lib/AST/Expr.cpp @@ -402,7 +402,7 @@ DeclRefExpr *DeclRefExpr::Create(const ASTContext &Context, HasTemplateKWAndArgsInfo ? 1 : 0, TemplateArgs ? TemplateArgs->size() : 0); - void *Mem = Context.Allocate(Size, llvm::alignOf<DeclRefExpr>()); + void *Mem = Context.Allocate(Size, alignof(DeclRefExpr)); return new (Mem) DeclRefExpr(Context, QualifierLoc, TemplateKWLoc, D, RefersToEnclosingVariableOrCapture, NameInfo, FoundD, TemplateArgs, T, VK); @@ -419,7 +419,7 @@ DeclRefExpr *DeclRefExpr::CreateEmpty(const ASTContext &Context, ASTTemplateKWAndArgsInfo, TemplateArgumentLoc>( HasQualifier ? 1 : 0, HasFoundDecl ? 1 : 0, HasTemplateKWAndArgsInfo, NumTemplateArgs); - void *Mem = Context.Allocate(Size, llvm::alignOf<DeclRefExpr>()); + void *Mem = Context.Allocate(Size, alignof(DeclRefExpr)); return new (Mem) DeclRefExpr(EmptyShell()); } @@ -831,9 +831,9 @@ StringLiteral *StringLiteral::Create(const ASTContext &C, StringRef Str, // Allocate enough space for the StringLiteral plus an array of locations for // any concatenated string tokens. - void *Mem = C.Allocate(sizeof(StringLiteral)+ - sizeof(SourceLocation)*(NumStrs-1), - llvm::alignOf<StringLiteral>()); + void *Mem = + C.Allocate(sizeof(StringLiteral) + sizeof(SourceLocation) * (NumStrs - 1), + alignof(StringLiteral)); StringLiteral *SL = new (Mem) StringLiteral(Ty); // OPTIMIZE: could allocate this appended to the StringLiteral. @@ -849,9 +849,9 @@ StringLiteral *StringLiteral::Create(const ASTContext &C, StringRef Str, StringLiteral *StringLiteral::CreateEmpty(const ASTContext &C, unsigned NumStrs) { - void *Mem = C.Allocate(sizeof(StringLiteral)+ - sizeof(SourceLocation)*(NumStrs-1), - llvm::alignOf<StringLiteral>()); + void *Mem = + C.Allocate(sizeof(StringLiteral) + sizeof(SourceLocation) * (NumStrs - 1), + alignof(StringLiteral)); StringLiteral *SL = new (Mem) StringLiteral(QualType()); SL->CharByteWidth = 0; SL->Length = 0; @@ -1416,7 +1416,7 @@ MemberExpr *MemberExpr::Create( HasTemplateKWAndArgsInfo ? 1 : 0, targs ? targs->size() : 0); - void *Mem = C.Allocate(Size, llvm::alignOf<MemberExpr>()); + void *Mem = C.Allocate(Size, alignof(MemberExpr)); MemberExpr *E = new (Mem) MemberExpr(base, isarrow, OperatorLoc, memberdecl, nameinfo, ty, vk, ok); @@ -3604,7 +3604,7 @@ DesignatedInitExpr::Create(const ASTContext &C, SourceLocation ColonOrEqualLoc, bool UsesColonSyntax, Expr *Init) { void *Mem = C.Allocate(totalSizeToAlloc<Stmt *>(IndexExprs.size() + 1), - llvm::alignOf<DesignatedInitExpr>()); + alignof(DesignatedInitExpr)); return new (Mem) DesignatedInitExpr(C, C.VoidTy, Designators, ColonOrEqualLoc, UsesColonSyntax, IndexExprs, Init); @@ -3613,7 +3613,7 @@ DesignatedInitExpr::Create(const ASTContext &C, DesignatedInitExpr *DesignatedInitExpr::CreateEmpty(const ASTContext &C, unsigned NumIndexExprs) { void *Mem = C.Allocate(totalSizeToAlloc<Stmt *>(NumIndexExprs + 1), - llvm::alignOf<DesignatedInitExpr>()); + alignof(DesignatedInitExpr)); return new (Mem) DesignatedInitExpr(NumIndexExprs + 1); } @@ -3753,7 +3753,7 @@ PseudoObjectExpr *PseudoObjectExpr::Create(const ASTContext &Context, unsigned numSemanticExprs) { void *buffer = Context.Allocate(totalSizeToAlloc<Expr *>(1 + numSemanticExprs), - llvm::alignOf<PseudoObjectExpr>()); + alignof(PseudoObjectExpr)); return new(buffer) PseudoObjectExpr(sh, numSemanticExprs); } @@ -3781,7 +3781,7 @@ PseudoObjectExpr *PseudoObjectExpr::Create(const ASTContext &C, Expr *syntax, } void *buffer = C.Allocate(totalSizeToAlloc<Expr *>(semantics.size() + 1), - llvm::alignOf<PseudoObjectExpr>()); + alignof(PseudoObjectExpr)); return new(buffer) PseudoObjectExpr(type, VK, syntax, semantics, resultIndex); } |