diff --git a/clang/lib/CodeGen/CGStmtOpenMP.cpp b/clang/lib/CodeGen/CGStmtOpenMP.cpp --- a/clang/lib/CodeGen/CGStmtOpenMP.cpp +++ b/clang/lib/CodeGen/CGStmtOpenMP.cpp @@ -4293,7 +4293,7 @@ } } // Get list of lastprivate variables (for taskloops). - llvm::DenseMap LastprivateDstsOrigs; + llvm::MapVector LastprivateDstsOrigs; for (const auto *C : S.getClausesOfKind()) { auto IRef = C->varlist_begin(); auto ID = C->destination_exprs().begin(); @@ -4304,8 +4304,8 @@ Data.LastprivateCopies.push_back(IInit); } LastprivateDstsOrigs.insert( - {cast(cast(*ID)->getDecl()), - cast(*IRef)}); + std::make_pair(cast(cast(*ID)->getDecl()), + cast(*IRef))); ++IRef; ++ID; }