diff options
Diffstat (limited to 'clang/lib/AST')
-rw-r--r-- | clang/lib/AST/ASTContext.cpp | 12 | ||||
-rw-r--r-- | clang/lib/AST/DeclBase.cpp | 8 | ||||
-rw-r--r-- | clang/lib/AST/DeclCXX.cpp | 2 | ||||
-rw-r--r-- | clang/lib/AST/DeclGroup.cpp | 2 | ||||
-rw-r--r-- | clang/lib/AST/DeclObjC.cpp | 5 | ||||
-rw-r--r-- | clang/lib/AST/DeclTemplate.cpp | 2 | ||||
-rw-r--r-- | clang/lib/AST/Expr.cpp | 26 | ||||
-rw-r--r-- | clang/lib/AST/ExprCXX.cpp | 31 | ||||
-rw-r--r-- | clang/lib/AST/ExprObjC.cpp | 2 | ||||
-rw-r--r-- | clang/lib/AST/NestedNameSpecifier.cpp | 9 | ||||
-rw-r--r-- | clang/lib/AST/Stmt.cpp | 10 | ||||
-rw-r--r-- | clang/lib/AST/StmtCXX.cpp | 4 | ||||
-rw-r--r-- | clang/lib/AST/StmtObjC.cpp | 4 | ||||
-rw-r--r-- | clang/lib/AST/StmtOpenMP.cpp | 224 | ||||
-rw-r--r-- | clang/lib/AST/TemplateBase.cpp | 2 | ||||
-rw-r--r-- | clang/lib/AST/TypeLoc.cpp | 2 |
16 files changed, 164 insertions, 181 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp index 6b428839cf3..a6ac07f25cb 100644 --- a/clang/lib/AST/ASTContext.cpp +++ b/clang/lib/AST/ASTContext.cpp @@ -6887,7 +6887,7 @@ ASTContext::getQualifiedTemplateName(NestedNameSpecifier *NNS, QualifiedTemplateName *QTN = QualifiedTemplateNames.FindNodeOrInsertPos(ID, InsertPos); if (!QTN) { - QTN = new (*this, llvm::alignOf<QualifiedTemplateName>()) + QTN = new (*this, alignof(QualifiedTemplateName)) QualifiedTemplateName(NNS, TemplateKeyword, Template); QualifiedTemplateNames.InsertNode(QTN, InsertPos); } @@ -6915,11 +6915,11 @@ ASTContext::getDependentTemplateName(NestedNameSpecifier *NNS, NestedNameSpecifier *CanonNNS = getCanonicalNestedNameSpecifier(NNS); if (CanonNNS == NNS) { - QTN = new (*this, llvm::alignOf<DependentTemplateName>()) + QTN = new (*this, alignof(DependentTemplateName)) DependentTemplateName(NNS, Name); } else { TemplateName Canon = getDependentTemplateName(CanonNNS, Name); - QTN = new (*this, llvm::alignOf<DependentTemplateName>()) + QTN = new (*this, alignof(DependentTemplateName)) DependentTemplateName(NNS, Name, Canon); DependentTemplateName *CheckQTN = DependentTemplateNames.FindNodeOrInsertPos(ID, InsertPos); @@ -6951,13 +6951,13 @@ ASTContext::getDependentTemplateName(NestedNameSpecifier *NNS, NestedNameSpecifier *CanonNNS = getCanonicalNestedNameSpecifier(NNS); if (CanonNNS == NNS) { - QTN = new (*this, llvm::alignOf<DependentTemplateName>()) + QTN = new (*this, alignof(DependentTemplateName)) DependentTemplateName(NNS, Operator); } else { TemplateName Canon = getDependentTemplateName(CanonNNS, Operator); - QTN = new (*this, llvm::alignOf<DependentTemplateName>()) + QTN = new (*this, alignof(DependentTemplateName)) DependentTemplateName(NNS, Operator, Canon); - + DependentTemplateName *CheckQTN = DependentTemplateNames.FindNodeOrInsertPos(ID, InsertPos); assert(!CheckQTN && "Dependent template name canonicalization broken"); diff --git a/clang/lib/AST/DeclBase.cpp b/clang/lib/AST/DeclBase.cpp index 77e74b044fd..7e790cec68a 100644 --- a/clang/lib/AST/DeclBase.cpp +++ b/clang/lib/AST/DeclBase.cpp @@ -45,8 +45,7 @@ void Decl::updateOutOfDate(IdentifierInfo &II) const { } #define DECL(DERIVED, BASE) \ - static_assert(llvm::AlignOf<Decl>::Alignment >= \ - llvm::AlignOf<DERIVED##Decl>::Alignment, \ + static_assert(alignof(Decl) >= alignof(DERIVED##Decl), \ "Alignment sufficient after objects prepended to " #DERIVED); #define ABSTRACT_DECL(DECL) #include "clang/AST/DeclNodes.inc" @@ -55,7 +54,7 @@ void *Decl::operator new(std::size_t Size, const ASTContext &Context, unsigned ID, std::size_t Extra) { // Allocate an extra 8 bytes worth of storage, which ensures that the // resulting pointer will still be 8-byte aligned. - static_assert(sizeof(unsigned) * 2 >= llvm::AlignOf<Decl>::Alignment, + static_assert(sizeof(unsigned) * 2 >= alignof(Decl), "Decl won't be misaligned"); void *Start = Context.Allocate(Size + Extra + 8); void *Result = (char*)Start + 8; @@ -80,8 +79,7 @@ void *Decl::operator new(std::size_t Size, const ASTContext &Ctx, // Ensure required alignment of the resulting object by adding extra // padding at the start if required. size_t ExtraAlign = - llvm::OffsetToAlignment(sizeof(Module *), - llvm::AlignOf<Decl>::Alignment); + llvm::OffsetToAlignment(sizeof(Module *), alignof(Decl)); char *Buffer = reinterpret_cast<char *>( ::operator new(ExtraAlign + sizeof(Module *) + Size + Extra, Ctx)); Buffer += ExtraAlign; diff --git a/clang/lib/AST/DeclCXX.cpp b/clang/lib/AST/DeclCXX.cpp index 97f75a02052..5ca5d856638 100644 --- a/clang/lib/AST/DeclCXX.cpp +++ b/clang/lib/AST/DeclCXX.cpp @@ -1797,7 +1797,7 @@ CXXCtorInitializer *CXXCtorInitializer::Create(ASTContext &Context, VarDecl **Indices, unsigned NumIndices) { void *Mem = Context.Allocate(totalSizeToAlloc<VarDecl *>(NumIndices), - llvm::alignOf<CXXCtorInitializer>()); + alignof(CXXCtorInitializer)); return new (Mem) CXXCtorInitializer(Context, Member, MemberLoc, L, Init, R, Indices, NumIndices); } diff --git a/clang/lib/AST/DeclGroup.cpp b/clang/lib/AST/DeclGroup.cpp index 8bcf7f248d6..2f95e1f1c34 100644 --- a/clang/lib/AST/DeclGroup.cpp +++ b/clang/lib/AST/DeclGroup.cpp @@ -19,7 +19,7 @@ using namespace clang; DeclGroup* DeclGroup::Create(ASTContext &C, Decl **Decls, unsigned NumDecls) { assert(NumDecls > 1 && "Invalid DeclGroup"); unsigned Size = totalSizeToAlloc<Decl *>(NumDecls); - void* Mem = C.Allocate(Size, llvm::AlignOf<DeclGroup>::Alignment); + void *Mem = C.Allocate(Size, alignof(DeclGroup)); new (Mem) DeclGroup(NumDecls, Decls); return static_cast<DeclGroup*>(Mem); } diff --git a/clang/lib/AST/DeclObjC.cpp b/clang/lib/AST/DeclObjC.cpp index fdbac00fc94..72e0fcea7bd 100644 --- a/clang/lib/AST/DeclObjC.cpp +++ b/clang/lib/AST/DeclObjC.cpp @@ -800,8 +800,7 @@ void ObjCMethodDecl::setParamsAndSelLocs(ASTContext &C, if (Params.empty() && SelLocs.empty()) return; - static_assert(llvm::AlignOf<ParmVarDecl *>::Alignment >= - llvm::AlignOf<SourceLocation>::Alignment, + static_assert(alignof(ParmVarDecl *) >= alignof(SourceLocation), "Alignment not sufficient for SourceLocation"); unsigned Size = sizeof(ParmVarDecl *) * NumParams + @@ -1374,7 +1373,7 @@ ObjCTypeParamList *ObjCTypeParamList::create( SourceLocation rAngleLoc) { void *mem = ctx.Allocate(totalSizeToAlloc<ObjCTypeParamDecl *>(typeParams.size()), - llvm::alignOf<ObjCTypeParamList>()); + alignof(ObjCTypeParamList)); return new (mem) ObjCTypeParamList(lAngleLoc, typeParams, rAngleLoc); } diff --git a/clang/lib/AST/DeclTemplate.cpp b/clang/lib/AST/DeclTemplate.cpp index bcc8878eeae..7b5394f4598 100644 --- a/clang/lib/AST/DeclTemplate.cpp +++ b/clang/lib/AST/DeclTemplate.cpp @@ -66,7 +66,7 @@ TemplateParameterList::Create(const ASTContext &C, SourceLocation TemplateLoc, SourceLocation RAngleLoc, Expr *RequiresClause) { void *Mem = C.Allocate(totalSizeToAlloc<NamedDecl *, Expr *>( Params.size(), RequiresClause ? 1u : 0u), - llvm::alignOf<TemplateParameterList>()); + alignof(TemplateParameterList)); return new (Mem) TemplateParameterList(TemplateLoc, LAngleLoc, Params, RAngleLoc, RequiresClause); } 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); } diff --git a/clang/lib/AST/ExprCXX.cpp b/clang/lib/AST/ExprCXX.cpp index 720a13a850a..5ad014f3e0b 100644 --- a/clang/lib/AST/ExprCXX.cpp +++ b/clang/lib/AST/ExprCXX.cpp @@ -243,7 +243,7 @@ UnresolvedLookupExpr::Create(const ASTContext &C, std::size_t Size = totalSizeToAlloc<ASTTemplateKWAndArgsInfo, TemplateArgumentLoc>(1, num_args); - void *Mem = C.Allocate(Size, llvm::alignOf<UnresolvedLookupExpr>()); + void *Mem = C.Allocate(Size, alignof(UnresolvedLookupExpr)); return new (Mem) UnresolvedLookupExpr(C, NamingClass, QualifierLoc, TemplateKWLoc, NameInfo, ADL, /*Overload*/ true, Args, @@ -258,7 +258,7 @@ UnresolvedLookupExpr::CreateEmpty(const ASTContext &C, std::size_t Size = totalSizeToAlloc<ASTTemplateKWAndArgsInfo, TemplateArgumentLoc>( HasTemplateKWAndArgsInfo, NumTemplateArgs); - void *Mem = C.Allocate(Size, llvm::alignOf<UnresolvedLookupExpr>()); + void *Mem = C.Allocate(Size, alignof(UnresolvedLookupExpr)); UnresolvedLookupExpr *E = new (Mem) UnresolvedLookupExpr(EmptyShell()); E->HasTemplateKWAndArgsInfo = HasTemplateKWAndArgsInfo; return E; @@ -301,9 +301,8 @@ OverloadExpr::OverloadExpr(StmtClass K, const ASTContext &C, } } - Results = static_cast<DeclAccessPair *>( - C.Allocate(sizeof(DeclAccessPair) * NumResults, - llvm::alignOf<DeclAccessPair>())); + Results = static_cast<DeclAccessPair *>(C.Allocate( + sizeof(DeclAccessPair) * NumResults, alignof(DeclAccessPair))); memcpy(Results, Begin.I, NumResults * sizeof(DeclAccessPair)); } @@ -340,11 +339,11 @@ void OverloadExpr::initializeResults(const ASTContext &C, assert(!Results && "Results already initialized!"); NumResults = End - Begin; if (NumResults) { - Results = static_cast<DeclAccessPair *>( - C.Allocate(sizeof(DeclAccessPair) * NumResults, - - llvm::alignOf<DeclAccessPair>())); - memcpy(Results, Begin.I, NumResults * sizeof(DeclAccessPair)); + Results = static_cast<DeclAccessPair *>( + C.Allocate(sizeof(DeclAccessPair) * NumResults, + + alignof(DeclAccessPair))); + memcpy(Results, Begin.I, NumResults * sizeof(DeclAccessPair)); } } @@ -1058,7 +1057,7 @@ ExprWithCleanups *ExprWithCleanups::Create(const ASTContext &C, Expr *subexpr, bool CleanupsHaveSideEffects, ArrayRef<CleanupObject> objects) { void *buffer = C.Allocate(totalSizeToAlloc<CleanupObject>(objects.size()), - llvm::alignOf<ExprWithCleanups>()); + alignof(ExprWithCleanups)); return new (buffer) ExprWithCleanups(subexpr, CleanupsHaveSideEffects, objects); } @@ -1072,7 +1071,7 @@ ExprWithCleanups *ExprWithCleanups::Create(const ASTContext &C, EmptyShell empty, unsigned numObjects) { void *buffer = C.Allocate(totalSizeToAlloc<CleanupObject>(numObjects), - llvm::alignOf<ExprWithCleanups>()); + alignof(ExprWithCleanups)); return new (buffer) ExprWithCleanups(empty, numObjects); } @@ -1171,7 +1170,7 @@ CXXDependentScopeMemberExpr::Create(const ASTContext &C, totalSizeToAlloc<ASTTemplateKWAndArgsInfo, TemplateArgumentLoc>( HasTemplateKWAndArgsInfo, NumTemplateArgs); - void *Mem = C.Allocate(Size, llvm::alignOf<CXXDependentScopeMemberExpr>()); + void *Mem = C.Allocate(Size, alignof(CXXDependentScopeMemberExpr)); return new (Mem) CXXDependentScopeMemberExpr(C, Base, BaseType, IsArrow, OperatorLoc, QualifierLoc, @@ -1188,7 +1187,7 @@ CXXDependentScopeMemberExpr::CreateEmpty(const ASTContext &C, std::size_t Size = totalSizeToAlloc<ASTTemplateKWAndArgsInfo, TemplateArgumentLoc>( HasTemplateKWAndArgsInfo, NumTemplateArgs); - void *Mem = C.Allocate(Size, llvm::alignOf<CXXDependentScopeMemberExpr>()); + void *Mem = C.Allocate(Size, alignof(CXXDependentScopeMemberExpr)); CXXDependentScopeMemberExpr *E = new (Mem) CXXDependentScopeMemberExpr(C, nullptr, QualType(), 0, SourceLocation(), @@ -1272,7 +1271,7 @@ UnresolvedMemberExpr *UnresolvedMemberExpr::Create( totalSizeToAlloc<ASTTemplateKWAndArgsInfo, TemplateArgumentLoc>( HasTemplateKWAndArgsInfo, TemplateArgs ? TemplateArgs->size() : 0); - void *Mem = C.Allocate(Size, llvm::alignOf<UnresolvedMemberExpr>()); + void *Mem = C.Allocate(Size, alignof(UnresolvedMemberExpr)); return new (Mem) UnresolvedMemberExpr( C, HasUnresolvedUsing, Base, BaseType, IsArrow, OperatorLoc, QualifierLoc, TemplateKWLoc, MemberNameInfo, TemplateArgs, Begin, End); @@ -1287,7 +1286,7 @@ UnresolvedMemberExpr::CreateEmpty(const ASTContext &C, totalSizeToAlloc<ASTTemplateKWAndArgsInfo, TemplateArgumentLoc>( HasTemplateKWAndArgsInfo, NumTemplateArgs); - void *Mem = C.Allocate(Size, llvm::alignOf<UnresolvedMemberExpr>()); + void *Mem = C.Allocate(Size, alignof(UnresolvedMemberExpr)); UnresolvedMemberExpr *E = new (Mem) UnresolvedMemberExpr(EmptyShell()); E->HasTemplateKWAndArgsInfo = HasTemplateKWAndArgsInfo; return E; diff --git a/clang/lib/AST/ExprObjC.cpp b/clang/lib/AST/ExprObjC.cpp index 0936a81a597..31c1b3f1562 100644 --- a/clang/lib/AST/ExprObjC.cpp +++ b/clang/lib/AST/ExprObjC.cpp @@ -278,7 +278,7 @@ ObjCMessageExpr *ObjCMessageExpr::alloc(const ASTContext &C, unsigned NumArgs, unsigned NumStoredSelLocs) { return (ObjCMessageExpr *)C.Allocate( totalSizeToAlloc<void *, SourceLocation>(NumArgs + 1, NumStoredSelLocs), - llvm::AlignOf<ObjCMessageExpr>::Alignment); + alignof(ObjCMessageExpr)); } void ObjCMessageExpr::getSelectorLocs( diff --git a/clang/lib/AST/NestedNameSpecifier.cpp b/clang/lib/AST/NestedNameSpecifier.cpp index 3883b641f1e..514c7c9f5b3 100644 --- a/clang/lib/AST/NestedNameSpecifier.cpp +++ b/clang/lib/AST/NestedNameSpecifier.cpp @@ -34,8 +34,8 @@ NestedNameSpecifier::FindOrInsert(const ASTContext &Context, NestedNameSpecifier *NNS = Context.NestedNameSpecifiers.FindNodeOrInsertPos(ID, InsertPos); if (!NNS) { - NNS = new (Context, llvm::alignOf<NestedNameSpecifier>()) - NestedNameSpecifier(Mockup); + NNS = + new (Context, alignof(NestedNameSpecifier)) NestedNameSpecifier(Mockup); Context.NestedNameSpecifiers.InsertNode(NNS, InsertPos); } @@ -113,8 +113,7 @@ NestedNameSpecifier * NestedNameSpecifier::GlobalSpecifier(const ASTContext &Context) { if (!Context.GlobalNestedNameSpecifier) Context.GlobalNestedNameSpecifier = - new (Context, llvm::alignOf<NestedNameSpecifier>()) - NestedNameSpecifier(); + new (Context, alignof(NestedNameSpecifier)) NestedNameSpecifier(); return Context.GlobalNestedNameSpecifier; } @@ -687,7 +686,7 @@ NestedNameSpecifierLocBuilder::getWithLocInContext(ASTContext &Context) const { // FIXME: After copying the source-location information, should we free // our (temporary) buffer and adopt the ASTContext-allocated memory? // Doing so would optimize repeated calls to getWithLocInContext(). - void *Mem = Context.Allocate(BufferSize, llvm::alignOf<void *>()); + void *Mem = Context.Allocate(BufferSize, alignof(void *)); memcpy(Mem, Buffer, BufferSize); return NestedNameSpecifierLoc(Representation, Mem); } diff --git a/clang/lib/AST/Stmt.cpp b/clang/lib/AST/Stmt.cpp index 194e07724d3..89fbdf9d589 100644 --- a/clang/lib/AST/Stmt.cpp +++ b/clang/lib/AST/Stmt.cpp @@ -315,7 +315,7 @@ AttributedStmt *AttributedStmt::Create(const ASTContext &C, SourceLocation Loc, Stmt *SubStmt) { assert(!Attrs.empty() && "Attrs should not be empty"); void *Mem = C.Allocate(sizeof(AttributedStmt) + sizeof(Attr *) * Attrs.size(), - llvm::alignOf<AttributedStmt>()); + alignof(AttributedStmt)); return new (Mem) AttributedStmt(Loc, Attrs, SubStmt); } @@ -323,7 +323,7 @@ AttributedStmt *AttributedStmt::CreateEmpty(const ASTContext &C, unsigned NumAttrs) { assert(NumAttrs > 0 && "NumAttrs should be greater than zero"); void *Mem = C.Allocate(sizeof(AttributedStmt) + sizeof(Attr *) * NumAttrs, - llvm::alignOf<AttributedStmt>()); + alignof(AttributedStmt)); return new (Mem) AttributedStmt(EmptyShell(), NumAttrs); } @@ -1002,7 +1002,7 @@ CapturedStmt::Capture *CapturedStmt::getStoredCaptures() const { unsigned Size = sizeof(CapturedStmt) + sizeof(Stmt *) * (NumCaptures + 1); // Offset of the first Capture object. - unsigned FirstCaptureOffset = llvm::alignTo(Size, llvm::alignOf<Capture>()); + unsigned FirstCaptureOffset = llvm::alignTo(Size, alignof(Capture)); return reinterpret_cast<Capture *>( reinterpret_cast<char *>(const_cast<CapturedStmt *>(this)) @@ -1059,7 +1059,7 @@ CapturedStmt *CapturedStmt::Create(const ASTContext &Context, Stmt *S, unsigned Size = sizeof(CapturedStmt) + sizeof(Stmt *) * (Captures.size() + 1); if (!Captures.empty()) { // Realign for the following Capture array. - Size = llvm::alignTo(Size, llvm::alignOf<Capture>()); + Size = llvm::alignTo(Size, alignof(Capture)); Size += sizeof(Capture) * Captures.size(); } @@ -1072,7 +1072,7 @@ CapturedStmt *CapturedStmt::CreateDeserialized(const ASTContext &Context, unsigned Size = sizeof(CapturedStmt) + sizeof(Stmt *) * (NumCaptures + 1); if (NumCaptures > 0) { // Realign for the following Capture array. - Size = llvm::alignTo(Size, llvm::alignOf<Capture>()); + Size = llvm::alignTo(Size, alignof(Capture)); Size += sizeof(Capture) * NumCaptures; } diff --git a/clang/lib/AST/StmtCXX.cpp b/clang/lib/AST/StmtCXX.cpp index 4692db84b50..4a04fc21126 100644 --- a/clang/lib/AST/StmtCXX.cpp +++ b/clang/lib/AST/StmtCXX.cpp @@ -28,7 +28,7 @@ CXXTryStmt *CXXTryStmt::Create(const ASTContext &C, SourceLocation tryLoc, std::size_t Size = sizeof(CXXTryStmt); Size += ((handlers.size() + 1) * sizeof(Stmt *)); - void *Mem = C.Allocate(Size, llvm::alignOf<CXXTryStmt>()); + void *Mem = C.Allocate(Size, alignof(CXXTryStmt)); return new (Mem) CXXTryStmt(tryLoc, tryBlock, handlers); } @@ -37,7 +37,7 @@ CXXTryStmt *CXXTryStmt::Create(const ASTContext &C, EmptyShell Empty, std::size_t Size = sizeof(CXXTryStmt); Size += ((numHandlers + 1) * sizeof(Stmt *)); - void *Mem = C.Allocate(Size, llvm::alignOf<CXXTryStmt>()); + void *Mem = C.Allocate(Size, alignof(CXXTryStmt)); return new (Mem) CXXTryStmt(Empty, numHandlers); } diff --git a/clang/lib/AST/StmtObjC.cpp b/clang/lib/AST/StmtObjC.cpp index a77550c7605..eea03f64c2f 100644 --- a/clang/lib/AST/StmtObjC.cpp +++ b/clang/lib/AST/StmtObjC.cpp @@ -50,7 +50,7 @@ ObjCAtTryStmt *ObjCAtTryStmt::Create(const ASTContext &Context, unsigned Size = sizeof(ObjCAtTryStmt) + (1 + NumCatchStmts + (atFinallyStmt != nullptr)) * sizeof(Stmt *); - void *Mem = Context.Allocate(Size, llvm::alignOf<ObjCAtTryStmt>()); + void *Mem = Context.Allocate(Size, alignof(ObjCAtTryStmt)); return new (Mem) ObjCAtTryStmt(atTryLoc, atTryStmt, CatchStmts, NumCatchStmts, atFinallyStmt); } @@ -60,7 +60,7 @@ ObjCAtTryStmt *ObjCAtTryStmt::CreateEmpty(const ASTContext &Context, bool HasFinally) { unsigned Size = sizeof(ObjCAtTryStmt) + (1 + NumCatchStmts + HasFinally) * sizeof(Stmt *); - void *Mem = Context.Allocate(Size, llvm::alignOf<ObjCAtTryStmt>()); + void *Mem = Context.Allocate(Size, alignof(ObjCAtTryStmt)); return new (Mem) ObjCAtTryStmt(EmptyShell(), NumCatchStmts, HasFinally); } diff --git a/clang/lib/AST/StmtOpenMP.cpp b/clang/lib/AST/StmtOpenMP.cpp index 7197586e39d..946f1d182f9 100644 --- a/clang/lib/AST/StmtOpenMP.cpp +++ b/clang/lib/AST/StmtOpenMP.cpp @@ -58,7 +58,7 @@ OMPParallelDirective *OMPParallelDirective::Create( const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt, bool HasCancel) { unsigned Size = - llvm::alignTo(sizeof(OMPParallelDirective), llvm::alignOf<OMPClause *>()); + llvm::alignTo(sizeof(OMPParallelDirective), alignof(OMPClause *)); void *Mem = C.Allocate(Size + sizeof(OMPClause *) * Clauses.size() + sizeof(Stmt *)); OMPParallelDirective *Dir = @@ -73,7 +73,7 @@ OMPParallelDirective *OMPParallelDirective::CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell) { unsigned Size = - llvm::alignTo(sizeof(OMPParallelDirective), llvm::alignOf<OMPClause *>()); + llvm::alignTo(sizeof(OMPParallelDirective), alignof(OMPClause *)); void *Mem = C.Allocate(Size + sizeof(OMPClause *) * NumClauses + sizeof(Stmt *)); return new (Mem) OMPParallelDirective(NumClauses); @@ -84,8 +84,7 @@ OMPSimdDirective::Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs) { - unsigned Size = - llvm::alignTo(sizeof(OMPSimdDirective), llvm::alignOf<OMPClause *>()); + unsigned Size = llvm::alignTo(sizeof(OMPSimdDirective), alignof(OMPClause *)); void *Mem = C.Allocate(Size + sizeof(OMPClause *) * Clauses.size() + sizeof(Stmt *) * numLoopChildren(CollapsedNum, OMPD_simd)); @@ -113,8 +112,7 @@ OMPSimdDirective *OMPSimdDirective::CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell) { - unsigned Size = - llvm::alignTo(sizeof(OMPSimdDirective), llvm::alignOf<OMPClause *>()); + unsigned Size = llvm::alignTo(sizeof(OMPSimdDirective), alignof(OMPClause *)); void *Mem = C.Allocate(Size + sizeof(OMPClause *) * NumClauses + sizeof(Stmt *) * numLoopChildren(CollapsedNum, OMPD_simd)); @@ -126,8 +124,7 @@ OMPForDirective::Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs, bool HasCancel) { - unsigned Size = - llvm::alignTo(sizeof(OMPForDirective), llvm::alignOf<OMPClause *>()); + unsigned Size = llvm::alignTo(sizeof(OMPForDirective), alignof(OMPClause *)); void *Mem = C.Allocate(Size + sizeof(OMPClause *) * Clauses.size() + sizeof(Stmt *) * numLoopChildren(CollapsedNum, OMPD_for)); @@ -166,8 +163,7 @@ OMPForDirective *OMPForDirective::CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell) { - unsigned Size = - llvm::alignTo(sizeof(OMPForDirective), llvm::alignOf<OMPClause *>()); + unsigned Size = llvm::alignTo(sizeof(OMPForDirective), alignof(OMPClause *)); void *Mem = C.Allocate(Size + sizeof(OMPClause *) * NumClauses + sizeof(Stmt *) * numLoopChildren(CollapsedNum, OMPD_for)); @@ -180,7 +176,7 @@ OMPForSimdDirective::Create(const ASTContext &C, SourceLocation StartLoc, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs) { unsigned Size = - llvm::alignTo(sizeof(OMPForSimdDirective), llvm::alignOf<OMPClause *>()); + llvm::alignTo(sizeof(OMPForSimdDirective), alignof(OMPClause *)); void *Mem = C.Allocate(Size + sizeof(OMPClause *) * Clauses.size() + sizeof(Stmt *) * numLoopChildren(CollapsedNum, OMPD_for_simd)); @@ -219,7 +215,7 @@ OMPForSimdDirective *OMPForSimdDirective::CreateEmpty(const ASTContext &C, unsigned CollapsedNum, EmptyShell) { unsigned Size = - llvm::alignTo(sizeof(OMPForSimdDirective), llvm::alignOf<OMPClause *>()); + llvm::alignTo(sizeof(OMPForSimdDirective), alignof(OMPClause *)); void *Mem = C.Allocate(Size + sizeof(OMPClause *) * NumClauses + sizeof(Stmt *) * numLoopChildren(CollapsedNum, OMPD_for_simd)); @@ -230,7 +226,7 @@ OMPSectionsDirective *OMPSectionsDirective::Create( const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt, bool HasCancel) { unsigned Size = - llvm::alignTo(sizeof(OMPSectionsDirective), llvm::alignOf<OMPClause *>()); + llvm::alignTo(sizeof(OMPSectionsDirective), alignof(OMPClause *)); void *Mem = C.Allocate(Size + sizeof(OMPClause *) * Clauses.size() + sizeof(Stmt *)); OMPSectionsDirective *Dir = @@ -245,7 +241,7 @@ OMPSectionsDirective *OMPSectionsDirective::CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell) { unsigned Size = - llvm::alignTo(sizeof(OMPSectionsDirective), llvm::alignOf<OMPClause *>()); + llvm::alignTo(sizeof(OMPSectionsDirective), alignof(OMPClause *)); void *Mem = C.Allocate(Size + sizeof(OMPClause *) * NumClauses + sizeof(Stmt *)); return new (Mem) OMPSectionsDirective(NumClauses); @@ -256,8 +252,7 @@ OMPSectionDirective *OMPSectionDirective::Create(const ASTContext &C, SourceLocation EndLoc, Stmt *AssociatedStmt, bool HasCancel) { - unsigned Size = - llvm::alignTo(sizeof(OMPSectionDirective), llvm::alignOf<Stmt *>()); + unsigned Size = llvm::alignTo(sizeof(OMPSectionDirective), alignof(Stmt *)); void *Mem = C.Allocate(Size + sizeof(Stmt *)); OMPSectionDirective *Dir = new (Mem) OMPSectionDirective(StartLoc, EndLoc); Dir->setAssociatedStmt(AssociatedStmt); @@ -267,8 +262,7 @@ OMPSectionDirective *OMPSectionDirective::Create(const ASTContext &C, OMPSectionDirective *OMPSectionDirective::CreateEmpty(const ASTContext &C, EmptyShell) { - unsigned Size = - llvm::alignTo(sizeof(OMPSectionDirective), llvm::alignOf<Stmt *>()); + unsigned Size = llvm::alignTo(sizeof(OMPSectionDirective), alignof(Stmt *)); void *Mem = C.Allocate(Size + sizeof(Stmt *)); return new (Mem) OMPSectionDirective(); } @@ -279,7 +273,7 @@ OMPSingleDirective *OMPSingleDirective::Create(const ASTContext &C, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt) { unsigned Size = - llvm::alignTo(sizeof(OMPSingleDirective), llvm::alignOf<OMPClause *>()); + llvm::alignTo(sizeof(OMPSingleDirective), alignof(OMPClause *)); void *Mem = C.Allocate(Size + sizeof(OMPClause *) * Clauses.size() + sizeof(Stmt *)); OMPSingleDirective *Dir = @@ -293,7 +287,7 @@ OMPSingleDirective *OMPSingleDirective::CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell) { unsigned Size = - llvm::alignTo(sizeof(OMPSingleDirective), llvm::alignOf<OMPClause *>()); + llvm::alignTo(sizeof(OMPSingleDirective), alignof(OMPClause *)); void *Mem = C.Allocate(Size + sizeof(OMPClause *) * NumClauses + sizeof(Stmt *)); return new (Mem) OMPSingleDirective(NumClauses); @@ -303,8 +297,7 @@ OMPMasterDirective *OMPMasterDirective::Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, Stmt *AssociatedStmt) { - unsigned Size = - llvm::alignTo(sizeof(OMPMasterDirective), llvm::alignOf<Stmt *>()); + unsigned Size = llvm::alignTo(sizeof(OMPMasterDirective), alignof(Stmt *)); void *Mem = C.Allocate(Size + sizeof(Stmt *)); OMPMasterDirective *Dir = new (Mem) OMPMasterDirective(StartLoc, EndLoc); Dir->setAssociatedStmt(AssociatedStmt); @@ -313,8 +306,7 @@ OMPMasterDirective *OMPMasterDirective::Create(const ASTContext &C, OMPMasterDirective *OMPMasterDirective::CreateEmpty(const ASTContext &C, EmptyShell) { - unsigned Size = - llvm::alignTo(sizeof(OMPMasterDirective), llvm::alignOf<Stmt *>()); + unsigned Size = llvm::alignTo(sizeof(OMPMasterDirective), alignof(Stmt *)); void *Mem = C.Allocate(Size + sizeof(Stmt *)); return new (Mem) OMPMasterDirective(); } @@ -324,7 +316,7 @@ OMPCriticalDirective *OMPCriticalDirective::Create( SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt) { unsigned Size = - llvm::alignTo(sizeof(OMPCriticalDirective), llvm::alignOf<OMPClause *>()); + llvm::alignTo(sizeof(OMPCriticalDirective), alignof(OMPClause *)); void *Mem = C.Allocate(Size + sizeof(OMPClause *) * Clauses.size() + sizeof(Stmt *)); OMPCriticalDirective *Dir = @@ -338,7 +330,7 @@ OMPCriticalDirective *OMPCriticalDirective::CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell) { unsigned Size = - llvm::alignTo(sizeof(OMPCriticalDirective), llvm::alignOf<OMPClause *>()); + llvm::alignTo(sizeof(OMPCriticalDirective), alignof(OMPClause *)); void *Mem = C.Allocate(Size + sizeof(OMPClause *) * NumClauses + sizeof(Stmt *)); return new (Mem) OMPCriticalDirective(NumClauses); @@ -348,8 +340,8 @@ OMPParallelForDirective *OMPParallelForDirective::Create( const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs, bool HasCancel) { - unsigned Size = llvm::alignTo(sizeof(OMPParallelForDirective), - llvm::alignOf<OMPClause *>()); + unsigned Size = + llvm::alignTo(sizeof(OMPParallelForDirective), alignof(OMPClause *)); void *Mem = C.Allocate(Size + sizeof(OMPClause *) * Clauses.size() + sizeof(Stmt *) * numLoopChildren(CollapsedNum, OMPD_parallel_for)); @@ -387,8 +379,8 @@ OMPParallelForDirective *OMPParallelForDirective::Create( OMPParallelForDirective * OMPParallelForDirective::CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell) { - unsigned Size = llvm::alignTo(sizeof(OMPParallelForDirective), - llvm::alignOf<OMPClause *>()); + unsigned Size = + llvm::alignTo(sizeof(OMPParallelForDirective), alignof(OMPClause *)); void *Mem = C.Allocate(Size + sizeof(OMPClause *) * NumClauses + sizeof(Stmt *) * numLoopChildren(CollapsedNum, OMPD_parallel_for)); @@ -399,8 +391,8 @@ OMPParallelForSimdDirective *OMPParallelForSimdDirective::Create( const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs) { - unsigned Size = llvm::alignTo(sizeof(OMPParallelForSimdDirective), - llvm::alignOf<OMPClause *>()); + unsigned Size = + llvm::alignTo(sizeof(OMPParallelForSimdDirective), alignof(OMPClause *)); void *Mem = C.Allocate( Size + sizeof(OMPClause *) * Clauses.size() + sizeof(Stmt *) * numLoopChildren(CollapsedNum, OMPD_parallel_for_simd)); @@ -438,8 +430,8 @@ OMPParallelForSimdDirective * OMPParallelForSimdDirective::CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell) { - unsigned Size = llvm::alignTo(sizeof(OMPParallelForSimdDirective), - llvm::alignOf<OMPClause *>()); + unsigned Size = + llvm::alignTo(sizeof(OMPParallelForSimdDirective), alignof(OMPClause *)); void *Mem = C.Allocate( Size + sizeof(OMPClause *) * NumClauses + sizeof(Stmt *) * numLoopChildren(CollapsedNum, OMPD_parallel_for_simd)); @@ -449,8 +441,8 @@ OMPParallelForSimdDirective::CreateEmpty(const ASTContext &C, OMPParallelSectionsDirective *OMPParallelSectionsDirective::Create( const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt, bool HasCancel) { - unsigned Size = llvm::alignTo(sizeof(OMPParallelSectionsDirective), - llvm::alignOf<OMPClause *>()); + unsigned Size = + llvm::alignTo(sizeof(OMPParallelSectionsDirective), alignof(OMPClause *)); void *Mem = C.Allocate(Size + sizeof(OMPClause *) * Clauses.size() + sizeof(Stmt *)); OMPParallelSectionsDirective *Dir = @@ -464,8 +456,8 @@ OMPParallelSectionsDirective *OMPParallelSectionsDirective::Create( OMPParallelSectionsDirective * OMPParallelSectionsDirective::CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell) { - unsigned Size = llvm::alignTo(sizeof(OMPParallelSectionsDirective), - llvm::alignOf<OMPClause *>()); + unsigned Size = + llvm::alignTo(sizeof(OMPParallelSectionsDirective), alignof(OMPClause *)); void *Mem = C.Allocate(Size + sizeof(OMPClause *) * NumClauses + sizeof(Stmt *)); return new (Mem) OMPParallelSectionsDirective(NumClauses); @@ -475,8 +467,7 @@ OMPTaskDirective * OMPTaskDirective::Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt, bool HasCancel) { - unsigned Size = - llvm::alignTo(sizeof(OMPTaskDirective), llvm::alignOf<OMPClause *>()); + unsigned Size = llvm::alignTo(sizeof(OMPTaskDirective), alignof(OMPClause *)); void *Mem = C.Allocate(Size + sizeof(OMPClause *) * Clauses.size() + sizeof(Stmt *)); OMPTaskDirective *Dir = @@ -490,8 +481,7 @@ OMPTaskDirective::Create(const ASTContext &C, SourceLocation StartLoc, OMPTaskDirective *OMPTaskDirective::CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell) { - unsigned Size = - llvm::alignTo(sizeof(OMPTaskDirective), llvm::alignOf<OMPClause *>()); + unsigned Size = llvm::alignTo(sizeof(OMPTaskDirective), alignof(OMPClause *)); void *Mem = C.Allocate(Size + sizeof(OMPClause *) * NumClauses + sizeof(Stmt *)); return new (Mem) OMPTaskDirective(NumClauses); @@ -544,8 +534,7 @@ OMPTaskgroupDirective *OMPTaskgroupDirective::Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, Stmt *AssociatedStmt) { - unsigned Size = - llvm::alignTo(sizeof(OMPTaskgroupDirective), llvm::alignOf<Stmt *>()); + unsigned Size = llvm::alignTo(sizeof(OMPTaskgroupDirective), alignof(Stmt *)); void *Mem = C.Allocate(Size + sizeof(Stmt *)); OMPTaskgroupDirective *Dir = new (Mem) OMPTaskgroupDirective(StartLoc, EndLoc); @@ -555,8 +544,7 @@ OMPTaskgroupDirective *OMPTaskgroupDirective::Create(const ASTContext &C, OMPTaskgroupDirective *OMPTaskgroupDirective::CreateEmpty(const ASTContext &C, EmptyShell) { - unsigned Size = - llvm::alignTo(sizeof(OMPTaskgroupDirective), llvm::alignOf<Stmt *>()); + unsigned Size = llvm::alignTo(sizeof(OMPTaskgroupDirective), alignof(Stmt *)); void *Mem = C.Allocate(Size + sizeof(Stmt *)); return new (Mem) OMPTaskgroupDirective(); } @@ -564,8 +552,8 @@ OMPTaskgroupDirective *OMPTaskgroupDirective::CreateEmpty(const ASTContext &C, OMPCancellationPointDirective *OMPCancellationPointDirective::Create( const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, OpenMPDirectiveKind CancelRegion) { - unsigned Size = llvm::alignTo(sizeof(OMPCancellationPointDirective), - llvm::alignOf<Stmt *>()); + unsigned Size = + llvm::alignTo(sizeof(OMPCancellationPointDirective), alignof(Stmt *)); void *Mem = C.Allocate(Size); OMPCancellationPointDirective *Dir = new (Mem) OMPCancellationPointDirective(StartLoc, EndLoc); @@ -575,8 +563,8 @@ OMPCancellationPointDirective *OMPCancellationPointDirective::Create( OMPCancellationPointDirective * OMPCancellationPointDirective::CreateEmpty(const ASTContext &C, EmptyShell) { - unsigned Size = llvm::alignTo(sizeof(OMPCancellationPointDirective), - llvm::alignOf<Stmt *>()); + unsigned Size = + llvm::alignTo(sizeof(OMPCancellationPointDirective), alignof(Stmt *)); void *Mem = C.Allocate(Size); return new (Mem) OMPCancellationPointDirective(); } @@ -587,7 +575,7 @@ OMPCancelDirective::Create(const ASTContext &C, SourceLocation StartLoc, OpenMPDirectiveKind CancelRegion) { unsigned Size = llvm::alignTo(sizeof(OMPCancelDirective) + sizeof(OMPClause *) * Clauses.size(), - llvm::alignOf<Stmt *>()); + alignof(Stmt *)); void *Mem = C.Allocate(Size); OMPCancelDirective *Dir = new (Mem) OMPCancelDirective(StartLoc, EndLoc, Clauses.size()); @@ -601,7 +589,7 @@ OMPCancelDirective *OMPCancelDirective::CreateEmpty(const ASTContext &C, EmptyShell) { unsigned Size = llvm::alignTo(sizeof(OMPCancelDirective) + sizeof(OMPClause *) * NumClauses, - llvm::alignOf<Stmt *>()); + alignof(Stmt *)); void *Mem = C.Allocate(Size); return new (Mem) OMPCancelDirective(NumClauses); } @@ -611,7 +599,7 @@ OMPFlushDirective *OMPFlushDirective::Create(const ASTContext &C, SourceLocation EndLoc, ArrayRef<OMPClause *> Clauses) { unsigned Size = - llvm::alignTo(sizeof(OMPFlushDirective), llvm::alignOf<OMPClause *>()); + llvm::alignTo(sizeof(OMPFlushDirective), alignof(OMPClause *)); void *Mem = C.Allocate(Size + sizeof(OMPClause *) * Clauses.size()); OMPFlushDirective *Dir = new (Mem) OMPFlushDirective(StartLoc, EndLoc, Clauses.size()); @@ -623,7 +611,7 @@ OMPFlushDirective *OMPFlushDirective::CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell) { unsigned Size = - llvm::alignTo(sizeof(OMPFlushDirective), llvm::alignOf<OMPClause *>()); + llvm::alignTo(sizeof(OMPFlushDirective), alignof(OMPClause *)); void *Mem = C.Allocate(Size + sizeof(OMPClause *) * NumClauses); return new (Mem) OMPFlushDirective(NumClauses); } @@ -634,7 +622,7 @@ OMPOrderedDirective *OMPOrderedDirective::Create(const ASTContext &C, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt) { unsigned Size = - llvm::alignTo(sizeof(OMPOrderedDirective), llvm::alignOf<OMPClause *>()); + llvm::alignTo(sizeof(OMPOrderedDirective), alignof(OMPClause *)); void *Mem = C.Allocate(Size + sizeof(Stmt *) + sizeof(OMPClause *) * Clauses.size()); OMPOrderedDirective *Dir = @@ -648,7 +636,7 @@ OMPOrderedDirective *OMPOrderedDirective::CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell) { unsigned Size = - llvm::alignTo(sizeof(OMPOrderedDirective), llvm::alignOf<OMPClause *>()); + llvm::alignTo(sizeof(OMPOrderedDirective), alignof(OMPClause *)); void *Mem = C.Allocate(Size + sizeof(Stmt *) + sizeof(OMPClause *) * NumClauses); return new (Mem) OMPOrderedDirective(NumClauses); @@ -659,7 +647,7 @@ OMPAtomicDirective *OMPAtomicDirective::Create( ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt, Expr *X, Expr *V, Expr *E, Expr *UE, bool IsXLHSInRHSPart, bool IsPostfixUpdate) { unsigned Size = - llvm::alignTo(sizeof(OMPAtomicDirective), llvm::alignOf<OMPClause *>()); + llvm::alignTo(sizeof(OMPAtomicDirective), alignof(OMPClause *)); void *Mem = C.Allocate(Size + sizeof(OMPClause *) * Clauses.size() + 5 * sizeof(Stmt *)); OMPAtomicDirective *Dir = @@ -679,7 +667,7 @@ OMPAtomicDirective *OMPAtomicDirective::CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell) { unsigned Size = - llvm::alignTo(sizeof(OMPAtomicDirective), llvm::alignOf<OMPClause *>()); + llvm::alignTo(sizeof(OMPAtomicDirective), alignof(OMPClause *)); void *Mem = C.Allocate(Size + sizeof(OMPClause *) * NumClauses + 5 * sizeof(Stmt *)); return new (Mem) OMPAtomicDirective(NumClauses); @@ -691,7 +679,7 @@ OMPTargetDirective *OMPTargetDirective::Create(const ASTContext &C, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt) { unsigned Size = - llvm::alignTo(sizeof(OMPTargetDirective), llvm::alignOf<OMPClause *>()); + llvm::alignTo(sizeof(OMPTargetDirective), alignof(OMPClause *)); void *Mem = C.Allocate(Size + sizeof(OMPClause *) * Clauses.size() + sizeof(Stmt *)); OMPTargetDirective *Dir = @@ -705,7 +693,7 @@ OMPTargetDirective *OMPTargetDirective::CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell) { unsigned Size = - llvm::alignTo(sizeof(OMPTargetDirective), llvm::alignOf<OMPClause *>()); + llvm::alignTo(sizeof(OMPTargetDirective), alignof(OMPClause *)); void *Mem = C.Allocate(Size + sizeof(OMPClause *) * NumClauses + sizeof(Stmt *)); return new (Mem) OMPTargetDirective(NumClauses); @@ -714,8 +702,8 @@ OMPTargetDirective *OMPTargetDirective::CreateEmpty(const ASTContext &C, OMPTargetParallelDirective *OMPTargetParallelDirective::Create( const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt) { - unsigned Size = llvm::alignTo(sizeof(OMPTargetParallelDirective), - llvm::alignOf<OMPClause *>()); + unsigned Size = + llvm::alignTo(sizeof(OMPTargetParallelDirective), alignof(OMPClause *)); void *Mem = C.Allocate(Size + sizeof(OMPClause *) * Clauses.size() + sizeof(Stmt *)); OMPTargetParallelDirective *Dir = @@ -728,8 +716,8 @@ OMPTargetParallelDirective *OMPTargetParallelDirective::Create( OMPTargetParallelDirective * OMPTargetParallelDirective::CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell) { - unsigned Size = llvm::alignTo(sizeof(OMPTargetParallelDirective), - llvm::alignOf<OMPClause *>()); + unsigned Size = + llvm::alignTo(sizeof(OMPTargetParallelDirective), alignof(OMPClause *)); void *Mem = C.Allocate(Size + sizeof(OMPClause *) * NumClauses + sizeof(Stmt *)); return new (Mem) OMPTargetParallelDirective(NumClauses); @@ -740,7 +728,7 @@ OMPTargetParallelForDirective *OMPTargetParallelForDirective::Create( unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs, bool HasCancel) { unsigned Size = llvm::alignTo(sizeof(OMPTargetParallelForDirective), - llvm::alignOf<OMPClause *>()); + alignof(OMPClause *)); void *Mem = C.Allocate( Size + sizeof(OMPClause *) * Clauses.size() + sizeof(Stmt *) * numLoopChildren(CollapsedNum, OMPD_target_parallel_for)); @@ -780,7 +768,7 @@ OMPTargetParallelForDirective::CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell) { unsigned Size = llvm::alignTo(sizeof(OMPTargetParallelForDirective), - llvm::alignOf<OMPClause *>()); + alignof(OMPClause *)); void *Mem = C.Allocate( Size + sizeof(OMPClause *) * NumClauses + sizeof(Stmt *) * numLoopChildren(CollapsedNum, OMPD_target_parallel_for)); @@ -790,9 +778,9 @@ OMPTargetParallelForDirective::CreateEmpty(const ASTContext &C, OMPTargetDataDirective *OMPTargetDataDirective::Create( const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt) { - void *Mem = C.Allocate(llvm::alignTo(sizeof(OMPTargetDataDirective), - llvm::alignOf<OMPClause *>()) + - sizeof(OMPClause *) * Clauses.size() + sizeof(Stmt *)); + void *Mem = C.Allocate( + llvm::alignTo(sizeof(OMPTargetDataDirective), alignof(OMPClause *)) + + sizeof(OMPClause *) * Clauses.size() + sizeof(Stmt *)); OMPTargetDataDirective *Dir = new (Mem) OMPTargetDataDirective(StartLoc, EndLoc, Clauses.size()); Dir->setClauses(Clauses); @@ -803,18 +791,18 @@ OMPTargetDataDirective *OMPTargetDataDirective::Create( OMPTargetDataDirective *OMPTargetDataDirective::CreateEmpty(const ASTContext &C, unsigned N, EmptyShell) { - void *Mem = C.Allocate(llvm::alignTo(sizeof(OMPTargetDataDirective), - llvm::alignOf<OMPClause *>()) + - sizeof(OMPClause *) * N + sizeof(Stmt *)); + void *Mem = C.Allocate( + llvm::alignTo(sizeof(OMPTargetDataDirective), alignof(OMPClause *)) + + sizeof(OMPClause *) * N + sizeof(Stmt *)); return new (Mem) OMPTargetDataDirective(N); } OMPTargetEnterDataDirective *OMPTargetEnterDataDirective::Create( const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef<OMPClause *> Clauses) { - void *Mem = C.Allocate(llvm::alignTo(sizeof(OMPTargetEnterDataDirective), - llvm::alignOf<OMPClause *>()) + - sizeof(OMPClause *) * Clauses.size()); + void *Mem = C.Allocate( + llvm::alignTo(sizeof(OMPTargetEnterDataDirective), alignof(OMPClause *)) + + sizeof(OMPClause *) * Clauses.size()); OMPTargetEnterDataDirective *Dir = new (Mem) OMPTargetEnterDataDirective(StartLoc, EndLoc, Clauses.size()); Dir->setClauses(Clauses); @@ -824,9 +812,9 @@ OMPTargetEnterDataDirective *OMPTargetEnterDataDirective::Create( OMPTargetEnterDataDirective * OMPTargetEnterDataDirective::CreateEmpty(const ASTContext &C, unsigned N, EmptyShell) { - void *Mem = C.Allocate(llvm::alignTo(sizeof(OMPTargetEnterDataDirective), - llvm::alignOf<OMPClause *>()) + - sizeof(OMPClause *) * N); + void *Mem = C.Allocate( + llvm::alignTo(sizeof(OMPTargetEnterDataDirective), alignof(OMPClause *)) + + sizeof(OMPClause *) * N); return new (Mem) OMPTargetEnterDataDirective(N); } @@ -834,9 +822,9 @@ OMPTargetExitDataDirective * OMPTargetExitDataDirective::Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef<OMPClause *> Clauses) { - void *Mem = C.Allocate(llvm::alignTo(sizeof(OMPTargetExitDataDirective), - llvm::alignOf<OMPClause *>()) + - sizeof(OMPClause *) * Clauses.size()); + void *Mem = C.Allocate( + llvm::alignTo(sizeof(OMPTargetExitDataDirective), alignof(OMPClause *)) + + sizeof(OMPClause *) * Clauses.size()); OMPTargetExitDataDirective *Dir = new (Mem) OMPTargetExitDataDirective(StartLoc, EndLoc, Clauses.size()); Dir->setClauses(Clauses); @@ -846,9 +834,9 @@ OMPTargetExitDataDirective::Create(const ASTContext &C, SourceLocation StartLoc, OMPTargetExitDataDirective * OMPTargetExitDataDirective::CreateEmpty(const ASTContext &C, unsigned N, EmptyShell) { - void *Mem = C.Allocate(llvm::alignTo(sizeof(OMPTargetExitDataDirective), - llvm::alignOf<OMPClause *>()) + - sizeof(OMPClause *) * N); + void *Mem = C.Allocate( + llvm::alignTo(sizeof(OMPTargetExitDataDirective), alignof(OMPClause *)) + + sizeof(OMPClause *) * N); return new (Mem) OMPTargetExitDataDirective(N); } @@ -858,7 +846,7 @@ OMPTeamsDirective *OMPTeamsDirective::Create(const ASTContext &C, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt) { unsigned Size = - llvm::alignTo(sizeof(OMPTeamsDirective), llvm::alignOf<OMPClause *>()); + llvm::alignTo(sizeof(OMPTeamsDirective), alignof(OMPClause *)); void *Mem = C.Allocate(Size + sizeof(OMPClause *) * Clauses.size() + sizeof(Stmt *)); OMPTeamsDirective *Dir = @@ -872,7 +860,7 @@ OMPTeamsDirective *OMPTeamsDirective::CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell) { unsigned Size = - llvm::alignTo(sizeof(OMPTeamsDirective), llvm::alignOf<OMPClause *>()); + llvm::alignTo(sizeof(OMPTeamsDirective), alignof(OMPClause *)); void *Mem = C.Allocate(Size + sizeof(OMPClause *) * NumClauses + sizeof(Stmt *)); return new (Mem) OMPTeamsDirective(NumClauses); @@ -883,7 +871,7 @@ OMPTaskLoopDirective *OMPTaskLoopDirective::Create( unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs) { unsigned Size = - llvm::alignTo(sizeof(OMPTaskLoopDirective), llvm::alignOf<OMPClause *>()); + llvm::alignTo(sizeof(OMPTaskLoopDirective), alignof(OMPClause *)); void *Mem = C.Allocate(Size + sizeof(OMPClause *) * Clauses.size() + sizeof(Stmt *) * numLoopChildren(CollapsedNum, OMPD_taskloop)); @@ -922,7 +910,7 @@ OMPTaskLoopDirective *OMPTaskLoopDirective::CreateEmpty(const ASTContext &C, unsigned CollapsedNum, EmptyShell) { unsigned Size = - llvm::alignTo(sizeof(OMPTaskLoopDirective), llvm::alignOf<OMPClause *>()); + llvm::alignTo(sizeof(OMPTaskLoopDirective), alignof(OMPClause *)); void *Mem = C.Allocate(Size + sizeof(OMPClause *) * NumClauses + sizeof(Stmt *) * numLoopChildren(CollapsedNum, OMPD_taskloop)); @@ -933,8 +921,8 @@ OMPTaskLoopSimdDirective *OMPTaskLoopSimdDirective::Create( const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs) { - unsigned Size = llvm::alignTo(sizeof(OMPTaskLoopSimdDirective), - llvm::alignOf<OMPClause *>()); + unsigned Size = + llvm::alignTo(sizeof(OMPTaskLoopSimdDirective), alignof(OMPClause *)); void *Mem = C.Allocate(Size + sizeof(OMPClause *) * Clauses.size() + sizeof(Stmt *) * numLoopChildren(CollapsedNum, OMPD_taskloop_simd)); @@ -971,8 +959,8 @@ OMPTaskLoopSimdDirective *OMPTaskLoopSimdDirective::Create( OMPTaskLoopSimdDirective * OMPTaskLoopSimdDirective::CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell) { - unsigned Size = llvm::alignTo(sizeof(OMPTaskLoopSimdDirective), - llvm::alignOf<OMPClause *>()); + unsigned Size = + llvm::alignTo(sizeof(OMPTaskLoopSimdDirective), alignof(OMPClause *)); void *Mem = C.Allocate(Size + sizeof(OMPClause *) * NumClauses + sizeof(Stmt *) * numLoopChildren(CollapsedNum, OMPD_taskloop_simd)); @@ -983,8 +971,8 @@ OMPDistributeDirective *OMPDistributeDirective::Create( const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs) { - unsigned Size = llvm::alignTo(sizeof(OMPDistributeDirective), - llvm::alignOf<OMPClause *>()); + unsigned Size = + llvm::alignTo(sizeof(OMPDistributeDirective), alignof(OMPClause *)); void *Mem = C.Allocate(Size + sizeof(OMPClause *) * Clauses.size() + sizeof(Stmt *) * numLoopChildren(CollapsedNum, OMPD_distribute)); @@ -1021,8 +1009,8 @@ OMPDistributeDirective *OMPDistributeDirective::Create( OMPDistributeDirective * OMPDistributeDirective::CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell) { - unsigned Size = llvm::alignTo(sizeof(OMPDistributeDirective), - llvm::alignOf<OMPClause *>()); + unsigned Size = + llvm::alignTo(sizeof(OMPDistributeDirective), alignof(OMPClause *)); void *Mem = C.Allocate(Size + sizeof(OMPClause *) * NumClauses + sizeof(Stmt *) * numLoopChildren(CollapsedNum, OMPD_distribute)); @@ -1033,8 +1021,8 @@ OMPTargetUpdateDirective * OMPTargetUpdateDirective::Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, ArrayRef<OMPClause *> Clauses) { - unsigned Size = llvm::alignTo(sizeof(OMPTargetUpdateDirective), - llvm::alignOf<OMPClause *>()); + unsigned Size = + llvm::alignTo(sizeof(OMPTargetUpdateDirective), alignof(OMPClause *)); void *Mem = C.Allocate(Size + sizeof(OMPClause *) * Clauses.size()); OMPTargetUpdateDirective *Dir = new (Mem) OMPTargetUpdateDirective(StartLoc, EndLoc, Clauses.size()); @@ -1045,8 +1033,8 @@ OMPTargetUpdateDirective::Create(const ASTContext &C, SourceLocation StartLoc, OMPTargetUpdateDirective * OMPTargetUpdateDirective::CreateEmpty(const ASTContext &C, unsigned NumClauses, EmptyShell) { - unsigned Size = llvm::alignTo(sizeof(OMPTargetUpdateDirective), - llvm::alignOf<OMPClause *>()); + unsigned Size = + llvm::alignTo(sizeof(OMPTargetUpdateDirective), alignof(OMPClause *)); void *Mem = C.Allocate(Size + sizeof(OMPClause *) * NumClauses); return new (Mem) OMPTargetUpdateDirective(NumClauses); } @@ -1056,7 +1044,7 @@ OMPDistributeParallelForDirective *OMPDistributeParallelForDirective::Create( unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs) { unsigned Size = llvm::alignTo(sizeof(OMPDistributeParallelForDirective), - llvm::alignOf<OMPClause *>()); + alignof(OMPClause *)); void *Mem = C.Allocate( Size + sizeof(OMPClause *) * Clauses.size() + sizeof(Stmt *) * @@ -1098,7 +1086,7 @@ OMPDistributeParallelForDirective::CreateEmpty(const ASTContext &C, unsigned CollapsedNum, EmptyShell) { unsigned Size = llvm::alignTo(sizeof(OMPDistributeParallelForDirective), - llvm::alignOf<OMPClause *>()); + alignof(OMPClause *)); void *Mem = C.Allocate( Size + sizeof(OMPClause *) * NumClauses + sizeof(Stmt *) * @@ -1112,7 +1100,7 @@ OMPDistributeParallelForSimdDirective::Create( unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs) { unsigned Size = llvm::alignTo(sizeof(OMPDistributeParallelForSimdDirective), - llvm::alignOf<OMPClause *>()); + alignof(OMPClause *)); void *Mem = C.Allocate( Size + sizeof(OMPClause *) * Clauses.size() + sizeof(Stmt *) * @@ -1154,7 +1142,7 @@ OMPDistributeParallelForSimdDirective::CreateEmpty(const ASTContext &C, unsigned CollapsedNum, EmptyShell) { unsigned Size = llvm::alignTo(sizeof(OMPDistributeParallelForSimdDirective), - llvm::alignOf<OMPClause *>()); + alignof(OMPClause *)); void *Mem = C.Allocate( Size + sizeof(OMPClause *) * NumClauses + sizeof(Stmt *) * @@ -1167,8 +1155,8 @@ OMPDistributeSimdDirective *OMPDistributeSimdDirective::Create( const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs) { - unsigned Size = llvm::alignTo(sizeof(OMPDistributeSimdDirective), - llvm::alignOf<OMPClause *>()); + unsigned Size = + llvm::alignTo(sizeof(OMPDistributeSimdDirective), alignof(OMPClause *)); void *Mem = C.Allocate( Size + sizeof(OMPClause *) * Clauses.size() + sizeof(Stmt *) * @@ -1207,8 +1195,8 @@ OMPDistributeSimdDirective * OMPDistributeSimdDirective::CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell) { - unsigned Size = llvm::alignTo(sizeof(OMPDistributeSimdDirective), - llvm::alignOf<OMPClause *>()); + unsigned Size = + llvm::alignTo(sizeof(OMPDistributeSimdDirective), alignof(OMPClause *)); void *Mem = C.Allocate( Size + sizeof(OMPClause *) * NumClauses + sizeof(Stmt *) * @@ -1221,7 +1209,7 @@ OMPTargetParallelForSimdDirective *OMPTargetParallelForSimdDirective::Create( unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs) { unsigned Size = llvm::alignTo(sizeof(OMPTargetParallelForSimdDirective), - llvm::alignOf<OMPClause *>()); + alignof(OMPClause *)); void *Mem = C.Allocate( Size + sizeof(OMPClause *) * Clauses.size() + sizeof(Stmt *) * @@ -1263,7 +1251,7 @@ OMPTargetParallelForSimdDirective::CreateEmpty(const ASTContext &C, unsigned CollapsedNum, EmptyShell) { unsigned Size = llvm::alignTo(sizeof(OMPTargetParallelForSimdDirective), - llvm::alignOf<OMPClause *>()); + alignof(OMPClause *)); void *Mem = C.Allocate( Size + sizeof(OMPClause *) * NumClauses + sizeof(Stmt *) * @@ -1276,8 +1264,8 @@ OMPTargetSimdDirective::Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs) { - unsigned Size = llvm::alignTo(sizeof(OMPTargetSimdDirective), - llvm::alignOf<OMPClause *>()); + unsigned Size = + llvm::alignTo(sizeof(OMPTargetSimdDirective), alignof(OMPClause *)); void *Mem = C.Allocate(Size + sizeof(OMPClause *) * Clauses.size() + sizeof(Stmt *) * numLoopChildren(CollapsedNum, OMPD_target_simd)); @@ -1304,8 +1292,8 @@ OMPTargetSimdDirective::Create(const ASTContext &C, SourceLocation StartLoc, OMPTargetSimdDirective * OMPTargetSimdDirective::CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell) { - unsigned Size = llvm::alignTo(sizeof(OMPTargetSimdDirective), - llvm::alignOf<OMPClause *>()); + unsigned Size = + llvm::alignTo(sizeof(OMPTargetSimdDirective), alignof(OMPClause *)); void *Mem = C.Allocate(Size + sizeof(OMPClause *) * NumClauses + sizeof(Stmt *) * numLoopChildren(CollapsedNum, OMPD_target_simd)); @@ -1316,8 +1304,8 @@ OMPTeamsDistributeDirective *OMPTeamsDistributeDirective::Create( const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt, const HelperExprs &Exprs) { - unsigned Size = llvm::alignTo(sizeof(OMPTeamsDistributeDirective), - llvm::alignOf<OMPClause *>()); + unsigned Size = + llvm::alignTo(sizeof(OMPTeamsDistributeDirective), alignof(OMPClause *)); void *Mem = C.Allocate( Size + sizeof(OMPClause *) * Clauses.size() + sizeof(Stmt *) * numLoopChildren(CollapsedNum, OMPD_teams_distribute)); @@ -1355,8 +1343,8 @@ OMPTeamsDistributeDirective * OMPTeamsDistributeDirective::CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned CollapsedNum, EmptyShell) { - unsigned Size = llvm::alignTo(sizeof(OMPTeamsDistributeDirective), - llvm::alignOf<OMPClause *>()); + unsigned Size = + llvm::alignTo(sizeof(OMPTeamsDistributeDirective), alignof(OMPClause *)); void *Mem = C.Allocate( Size + sizeof(OMPClause *) * NumClauses + sizeof(Stmt *) * numLoopChildren(CollapsedNum, OMPD_teams_distribute)); diff --git a/clang/lib/AST/TemplateBase.cpp b/clang/lib/AST/TemplateBase.cpp index b75ede862f7..b1c88f93b6a 100644 --- a/clang/lib/AST/TemplateBase.cpp +++ b/clang/lib/AST/TemplateBase.cpp @@ -530,7 +530,7 @@ const ASTTemplateArgumentListInfo * ASTTemplateArgumentListInfo::Create(ASTContext &C, const TemplateArgumentListInfo &List) { std::size_t size = totalSizeToAlloc<TemplateArgumentLoc>(List.size()); - void *Mem = C.Allocate(size, llvm::alignOf<ASTTemplateArgumentListInfo>()); + void *Mem = C.Allocate(size, alignof(ASTTemplateArgumentListInfo)); return new (Mem) ASTTemplateArgumentListInfo(List); } diff --git a/clang/lib/AST/TypeLoc.cpp b/clang/lib/AST/TypeLoc.cpp index 4b227da35ff..7242858f21e 100644 --- a/clang/lib/AST/TypeLoc.cpp +++ b/clang/lib/AST/TypeLoc.cpp @@ -18,7 +18,7 @@ #include "llvm/Support/ErrorHandling.h" using namespace clang; -static const unsigned TypeLocMaxDataAlign = llvm::alignOf<void *>(); +static const unsigned TypeLocMaxDataAlign = alignof(void *); //===----------------------------------------------------------------------===// // TypeLoc Implementation |