diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2016-02-11 05:35:55 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2016-02-11 05:35:55 +0000 |
commit | 4244be25bd7c438ac755813ff33e6e80ca6b6f34 (patch) | |
tree | 070f65691c352cc73445c89a3be0f36b69a0d938 /clang/lib/CodeGen/CGStmtOpenMP.cpp | |
parent | fe26def35c61d4773b5378a1e797033538f96bf8 (diff) | |
download | bcm5719-llvm-4244be25bd7c438ac755813ff33e6e80ca6b6f34.tar.gz bcm5719-llvm-4244be25bd7c438ac755813ff33e6e80ca6b6f34.zip |
[OPENMP] Rename OMPCapturedFieldDecl to OMPCapturedExprDecl, NFC.
OMPCapturedExprDecl allows caopturing not only of fielddecls, but also
other expressions. It also allows to simplify codegen for several
clauses.
llvm-svn: 260492
Diffstat (limited to 'clang/lib/CodeGen/CGStmtOpenMP.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGStmtOpenMP.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/clang/lib/CodeGen/CGStmtOpenMP.cpp b/clang/lib/CodeGen/CGStmtOpenMP.cpp index 46b7923e2c6..b378cc6dea5 100644 --- a/clang/lib/CodeGen/CGStmtOpenMP.cpp +++ b/clang/lib/CodeGen/CGStmtOpenMP.cpp @@ -1535,16 +1535,10 @@ emitScheduleClause(CodeGenFunction &CGF, const OMPLoopDirective &S, M2 = C->getSecondScheduleModifier(); if (const auto *Ch = C->getChunkSize()) { if (auto *ImpRef = cast_or_null<DeclRefExpr>(C->getHelperChunkSize())) { - if (OuterRegion) { - const VarDecl *ImpVar = cast<VarDecl>(ImpRef->getDecl()); - CGF.EmitVarDecl(*ImpVar); - CGF.EmitStoreThroughLValue( - CGF.EmitAnyExpr(Ch), - CGF.MakeAddrLValue(CGF.GetAddrOfLocalVar(ImpVar), - ImpVar->getType())); - } else { + if (OuterRegion) + CGF.EmitVarDecl(*cast<VarDecl>(ImpRef->getDecl())); + else Ch = ImpRef; - } } if (!C->getHelperChunkSize() || !OuterRegion) { Chunk = CGF.EmitScalarExpr(Ch); |