OMPFlushClause *OMPFlushClause::Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc, ArrayRef<Expr *> VL) { void *Mem = C.Allocate(totalSizeToAlloc<Expr *>(VL.size())); OMPFlushClause *Clause = new (Mem) OMPFlushClause(StartLoc, LParenLoc, EndLoc, VL.size()); Clause->setVarRefs(VL); return Clause; }
OMPFlushClause *OMPFlushClause::Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc, ArrayRef<Expr *> VL) { void *Mem = C.Allocate(llvm::RoundUpToAlignment(sizeof(OMPFlushClause), llvm::alignOf<Expr *>()) + sizeof(Expr *) * VL.size()); OMPFlushClause *Clause = new (Mem) OMPFlushClause(StartLoc, LParenLoc, EndLoc, VL.size()); Clause->setVarRefs(VL); return Clause; }