ABataev requested changes to this revision. This revision now requires changes to proceed.
================ Comment at: lib/CodeGen/CGStmtOpenMP.cpp:1868-1871 @@ -1867,1 +1867,6 @@ +void CodeGenFunction::EmitOMPDistributeParallelForDirective( + const OMPDistributeParallelForDirective &S) { + EmitStmt(cast<CapturedStmt>(S.getAssociatedStmt())->getCapturedStmt()); +} + ---------------- No, it won't work. Use the following code: ``` OMPLexicalScope Scope(*this, S, /*AsInlined=*/true); CGM.getOpenMPRuntime().emitInlinedDirective( *this, OMPD_distribute_parallel_for, [&S](CodeGenFunction &CGF, PrePostActionTy &) { OMPLoopScope PreInitScope(CGF, S); CGF.EmitStmt(cast<CapturedStmt>(S.getAssociatedStmt())->getCapturedStmt()); }); ``` ================ Comment at: lib/Sema/SemaOpenMP.cpp:4985-4987 @@ +4984,5 @@ + + PrevLBDecl->setType(VType); + PrevUBDecl->setType(VType); + + // Previous lower and upper bounds are obtained from the region ---------------- Not sure that this is a good solution. I'd prefer not to change the types of parameters. Maybe it is better to pass them as pointers and then cast to proper types? Repository: rL LLVM http://reviews.llvm.org/D21564 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits