Revert "[OPENMP] Fix emission of the loop doacross constructs."

This reverts commit r339568 because of the problems with the buildbots.

llvm-svn: 339574
diff --git a/clang/lib/CodeGen/CGStmtOpenMP.cpp b/clang/lib/CodeGen/CGStmtOpenMP.cpp
index fd76414..f91f337 100644
--- a/clang/lib/CodeGen/CGStmtOpenMP.cpp
+++ b/clang/lib/CodeGen/CGStmtOpenMP.cpp
@@ -2244,7 +2244,7 @@
     bool Ordered = false;
     if (const auto *OrderedClause = S.getSingleClause<OMPOrderedClause>()) {
       if (OrderedClause->getNumForLoops())
-        RT.emitDoacrossInit(*this, S, OrderedClause->getLoopNumIterations());
+        RT.emitDoacrossInit(*this, S);
       else
         Ordered = true;
     }
@@ -4942,20 +4942,6 @@
               CGF.EmitVarDecl(*VD);
           }
         }
-        for (const auto *C : D.getClausesOfKind<OMPOrderedClause>()) {
-          if (!C->getNumForLoops())
-            continue;
-          for (unsigned I = LD->getCollapsedNumber(),
-                        E = C->getLoopNumIterations().size();
-               I < E; ++I) {
-            if (const auto *VD = dyn_cast<OMPCapturedExprDecl>(
-                    cast<DeclRefExpr>(C->getLoopCunter(I))->getDecl())) {
-              // Emit only those that were not explicitly referenced in clauses.
-              if (!CGF.LocalDeclMap.count(VD))
-                CGF.EmitVarDecl(*VD);
-            }
-          }
-        }
       }
       CGF.EmitStmt(D.getInnermostCapturedStmt()->getCapturedStmt());
     }