diff options
Diffstat (limited to 'clang/lib/CodeGen/CGStmtOpenMP.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGStmtOpenMP.cpp | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/clang/lib/CodeGen/CGStmtOpenMP.cpp b/clang/lib/CodeGen/CGStmtOpenMP.cpp index 9ccac258ee0..457d21e3dc2 100644 --- a/clang/lib/CodeGen/CGStmtOpenMP.cpp +++ b/clang/lib/CodeGen/CGStmtOpenMP.cpp @@ -37,25 +37,10 @@ class OMPLexicalScope { } } - class PostUpdateCleanup final : public EHScopeStack::Cleanup { - const OMPExecutableDirective &S; - - public: - PostUpdateCleanup(const OMPExecutableDirective &S) : S(S) {} - - void Emit(CodeGenFunction &CGF, Flags /*flags*/) override { - if (!CGF.HaveInsertPoint()) - return; - (void)S; - // TODO: add cleanups for clauses that require post update. - } - }; - public: OMPLexicalScope(CodeGenFunction &CGF, const OMPExecutableDirective &S) : Scope(CGF, S.getSourceRange()) { emitPreInitStmt(CGF, S); - CGF.EHStack.pushCleanup<PostUpdateCleanup>(NormalAndEHCleanup, S); } }; } // namespace @@ -696,6 +681,8 @@ void CodeGenFunction::EmitOMPLastprivateClauseFinal( ++ISrcRef; ++IDestRef; } + if (auto *PostUpdate = C->getPostUpdateExpr()) + EmitIgnoredExpr(PostUpdate); } if (IsLastIterCond) EmitBlock(DoneBB, /*IsFinished=*/true); |