diff options
author | NAKAMURA Takumi <geek4civic@gmail.com> | 2015-12-09 04:35:57 +0000 |
---|---|---|
committer | NAKAMURA Takumi <geek4civic@gmail.com> | 2015-12-09 04:35:57 +0000 |
commit | 2d5c6ddf74296d38d0f194420be159687568026e (patch) | |
tree | 4ee6bbdb6860a8688c516db544ceadebcadbbf30 /clang/lib/AST/StmtOpenMP.cpp | |
parent | 12f79291771d6f4d2941afbee3028dc8ad2e232d (diff) |
Revert r255001, "Add parse and sema for OpenMP distribute directive and all its clauses excluding dist_schedule."
It causes memory leak. Some tests in test/OpenMP would fail.
llvm-svn: 255094
Diffstat (limited to 'clang/lib/AST/StmtOpenMP.cpp')
-rw-r--r-- | clang/lib/AST/StmtOpenMP.cpp | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/clang/lib/AST/StmtOpenMP.cpp b/clang/lib/AST/StmtOpenMP.cpp index ebdc64e4b83b..b6844edd8ccf 100644 --- a/clang/lib/AST/StmtOpenMP.cpp +++ b/clang/lib/AST/StmtOpenMP.cpp @@ -832,48 +832,3 @@ OMPTaskLoopSimdDirective::CreateEmpty(const ASTContext &C, unsigned NumClauses, return new (Mem) OMPTaskLoopSimdDirective(CollapsedNum, NumClauses); } -OMPDistributeDirective *OMPDistributeDirective::Create( - const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, - unsigned CollapsedNum, ArrayRef<OMPClause *> Clauses, Stmt *AssociatedStmt, - const HelperExprs &Exprs) { - unsigned Size = llvm::RoundUpToAlignment(sizeof(OMPDistributeDirective), - llvm::alignOf<OMPClause *>()); - void *Mem = C.Allocate(Size + sizeof(OMPClause *) * Clauses.size() + - sizeof(Stmt *) * - numLoopChildren(CollapsedNum, OMPD_distribute)); - OMPDistributeDirective *Dir = new (Mem) - OMPDistributeDirective(StartLoc, EndLoc, CollapsedNum, Clauses.size()); - Dir->setClauses(Clauses); - Dir->setAssociatedStmt(AssociatedStmt); - Dir->setIterationVariable(Exprs.IterationVarRef); - Dir->setLastIteration(Exprs.LastIteration); - Dir->setCalcLastIteration(Exprs.CalcLastIteration); - Dir->setPreCond(Exprs.PreCond); - Dir->setCond(Exprs.Cond); - Dir->setInit(Exprs.Init); - Dir->setInc(Exprs.Inc); - Dir->setIsLastIterVariable(Exprs.IL); - Dir->setLowerBoundVariable(Exprs.LB); - Dir->setUpperBoundVariable(Exprs.UB); - Dir->setStrideVariable(Exprs.ST); - Dir->setEnsureUpperBound(Exprs.EUB); - Dir->setNextLowerBound(Exprs.NLB); - Dir->setNextUpperBound(Exprs.NUB); - Dir->setCounters(Exprs.Counters); - Dir->setPrivateCounters(Exprs.PrivateCounters); - Dir->setInits(Exprs.Inits); - Dir->setUpdates(Exprs.Updates); - Dir->setFinals(Exprs.Finals); - return Dir; -} - -OMPDistributeDirective * -OMPDistributeDirective::CreateEmpty(const ASTContext &C, unsigned NumClauses, - unsigned CollapsedNum, EmptyShell) { - unsigned Size = llvm::RoundUpToAlignment(sizeof(OMPDistributeDirective), - llvm::alignOf<OMPClause *>()); - void *Mem = C.Allocate(Size + sizeof(OMPClause *) * NumClauses + - sizeof(Stmt *) * - numLoopChildren(CollapsedNum, OMPD_distribute)); - return new (Mem) OMPDistributeDirective(CollapsedNum, NumClauses); -} |