ABataev added inline comments. ================ Comment at: lib/CodeGen/CGExpr.cpp:1969 @@ -1945,3 +1968,3 @@ else - return EmitCapturedFieldLValue(*this, CapturedStmtInfo->lookup(VD), - CapturedStmtInfo->getContextValue()); + return EmitCapturedValue(*this, CapturedStmtInfo->lookup(VD), + CapturedStmtInfo->getContextValue()); ---------------- Samuel, why you don't want to capture all used variables in CapturedDecl instead of creating ImplicitParamDecl for each captured variable? Also, you will solve possible trouble with VLAs automatically using CapturedDecl.
================ Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:2953 @@ +2952,3 @@ + BasePointer = Pointer = LV.getAddress(); + uint64_t SizeVal = CGM.getContext().getTypeSize(ri->getType()) / 8; + Size = CGF.Builder.getInt64(SizeVal); ---------------- Use CGM.getContext().getTypeSizeInChars() instead of CGM.getContext().getTypeSize() / 8. ================ Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:2954 @@ +2953,3 @@ + uint64_t SizeVal = CGM.getContext().getTypeSize(ri->getType()) / 8; + Size = CGF.Builder.getInt64(SizeVal); + ---------------- Maybe llvm::ConstantInt::get(CGF.SizeTy, SizeVal)? ================ Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:2963 @@ +2962,3 @@ + uint64_t SizeVal = + CGM.getContext().getTypeSize(PtrTy->getPointeeType()) / 8; + Size = CGF.Builder.getInt64(SizeVal); ---------------- Use CGM.getContext().getTypeSizeInChars() instead of CGM.getContext().getTypeSize() / 8. ================ Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:2980 @@ +2979,3 @@ + uint64_t ElementTypeSize = + CGM.getContext().getTypeSize(ElementType) / 8; + Size = CGF.Builder.getInt64(ElementTypeSize); ---------------- The same ================ Comment at: lib/CodeGen/CGStmtOpenMP.cpp:2144-2145 @@ +2143,4 @@ + auto *ThisRef = LocalDeclMap[*pi]; + LValue Addr = LValue::MakeAddr(ThisRef, ri->getType(), CharUnits(), + CGM.getContext()); + CXXThisValue = EmitLoadOfLValue(Addr, CS.getLocStart()).getScalarVal(); ---------------- MakeNaturalAlignAddrLValue(ThisRef, ri->getType())? ================ Comment at: lib/CodeGen/CGStmtOpenMP.cpp:2147 @@ +2146,3 @@ + CXXThisValue = EmitLoadOfLValue(Addr, CS.getLocStart()).getScalarVal(); + ; + continue; ---------------- Extra semicolon http://reviews.llvm.org/D11361 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits