diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2018-08-02 17:33:11 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2018-08-02 17:33:11 +0000 |
commit | c7e70c433efc6953dc3888b9fbf9f3512d7da2b0 (patch) | |
tree | 27425930fc0c91650a7f3527fcac8e0f92907b90 /lib/AST/StmtOpenMP.cpp | |
parent | 486754660bb926339aefcf012a3f848592babb8b (diff) |
Diffstat (limited to 'lib/AST/StmtOpenMP.cpp')
-rw-r--r-- | lib/AST/StmtOpenMP.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/AST/StmtOpenMP.cpp b/lib/AST/StmtOpenMP.cpp index 87bf5aaaa585d..1258af7a2d37e 100644 --- a/lib/AST/StmtOpenMP.cpp +++ b/lib/AST/StmtOpenMP.cpp @@ -1222,9 +1222,9 @@ OMPTargetParallelForSimdDirective *OMPTargetParallelForSimdDirective::Create( alignof(OMPClause *)); void *Mem = C.Allocate( Size + sizeof(OMPClause *) * Clauses.size() + - sizeof(Stmt *) * + sizeof(Stmt *) * numLoopChildren(CollapsedNum, OMPD_target_parallel_for_simd)); - OMPTargetParallelForSimdDirective *Dir = + OMPTargetParallelForSimdDirective *Dir = new (Mem) OMPTargetParallelForSimdDirective(StartLoc, EndLoc, CollapsedNum, Clauses.size()); Dir->setClauses(Clauses); @@ -1262,20 +1262,20 @@ OMPTargetParallelForSimdDirective::CreateEmpty(const ASTContext &C, alignof(OMPClause *)); void *Mem = C.Allocate( Size + sizeof(OMPClause *) * NumClauses + - sizeof(Stmt *) * + sizeof(Stmt *) * numLoopChildren(CollapsedNum, OMPD_target_parallel_for_simd)); return new (Mem) OMPTargetParallelForSimdDirective(CollapsedNum, NumClauses); } OMPTargetSimdDirective * -OMPTargetSimdDirective::Create(const ASTContext &C, SourceLocation StartLoc, +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), alignof(OMPClause *)); void *Mem = C.Allocate(Size + sizeof(OMPClause *) * Clauses.size() + - sizeof(Stmt *) * + sizeof(Stmt *) * numLoopChildren(CollapsedNum, OMPD_target_simd)); OMPTargetSimdDirective *Dir = new (Mem) OMPTargetSimdDirective(StartLoc, EndLoc, CollapsedNum, Clauses.size()); @@ -1303,7 +1303,7 @@ OMPTargetSimdDirective::CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned Size = llvm::alignTo(sizeof(OMPTargetSimdDirective), alignof(OMPClause *)); void *Mem = C.Allocate(Size + sizeof(OMPClause *) * NumClauses + - sizeof(Stmt *) * + sizeof(Stmt *) * numLoopChildren(CollapsedNum, OMPD_target_simd)); return new (Mem) OMPTargetSimdDirective(CollapsedNum, NumClauses); } |