summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGStmtOpenMP.cpp
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2016-02-11 05:35:55 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2016-02-11 05:35:55 +0000
commit4244be25bd7c438ac755813ff33e6e80ca6b6f34 (patch)
tree070f65691c352cc73445c89a3be0f36b69a0d938 /clang/lib/CodeGen/CGStmtOpenMP.cpp
parentfe26def35c61d4773b5378a1e797033538f96bf8 (diff)
downloadbcm5719-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.cpp12
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);
OpenPOWER on IntegriCloud