summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2016-01-22 21:50:08 +0000
committerdim <dim@FreeBSD.org>2016-01-22 21:50:08 +0000
commit6e0d73d099af288ba2ca9f4ac232abadd8cf2ca9 (patch)
treee322839f15ba2f181f0b3a5f2fe3a7be147bce82 /contrib/llvm/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp
parent7cf07624a0c8bc9de65a351f13206cea487afb48 (diff)
downloadFreeBSD-src-6e0d73d099af288ba2ca9f4ac232abadd8cf2ca9.zip
FreeBSD-src-6e0d73d099af288ba2ca9f4ac232abadd8cf2ca9.tar.gz
Update llvm and clang to release_38 branch r258549.
Diffstat (limited to 'contrib/llvm/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp')
-rw-r--r--contrib/llvm/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/contrib/llvm/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp b/contrib/llvm/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp
index 3b97ba2..015a739 100644
--- a/contrib/llvm/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp
+++ b/contrib/llvm/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp
@@ -3548,14 +3548,16 @@ void CGOpenMPRuntime::emitReduction(CodeGenFunction &CGF, SourceLocation Loc,
E = CGF.EmitAnyExpr(EExpr);
CGF.EmitOMPAtomicSimpleUpdateExpr(
X, E, BO, /*IsXLHSInRHSPart=*/true, llvm::Monotonic, Loc,
- [&CGF, UpExpr, VD, IPriv](RValue XRValue) {
+ [&CGF, UpExpr, VD, IPriv, Loc](RValue XRValue) {
CodeGenFunction::OMPPrivateScope PrivateScope(CGF);
- PrivateScope.addPrivate(VD, [&CGF, VD, XRValue]() -> Address {
- Address LHSTemp = CGF.CreateMemTemp(VD->getType());
- CGF.EmitStoreThroughLValue(
- XRValue, CGF.MakeAddrLValue(LHSTemp, VD->getType()));
- return LHSTemp;
- });
+ PrivateScope.addPrivate(
+ VD, [&CGF, VD, XRValue, Loc]() -> Address {
+ Address LHSTemp = CGF.CreateMemTemp(VD->getType());
+ CGF.emitOMPSimpleStore(
+ CGF.MakeAddrLValue(LHSTemp, VD->getType()), XRValue,
+ VD->getType().getNonReferenceType(), Loc);
+ return LHSTemp;
+ });
(void)PrivateScope.Privatize();
return CGF.EmitAnyExpr(UpExpr);
});
OpenPOWER on IntegriCloud