[PATCH] D64558: Added mapping for pointers captured in Lambdas in OpenMP target regions

Alexey Bataev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 11 05:22:27 PDT 2019


ABataev added inline comments.


================
Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:8114
+      } else {
+        LValue VarLVal = CGF.EmitLValueForField(VDLVal, It->second);
+        RValue VarRVal = CGF.EmitLoadOfLValue(VarLVal, RD->getLocation());
----------------
I think you csn use `EmitLValueForFieldInitialization` just like gor the references and move the same code out of then-else branches because they use the same code. I mean, initialization of VarLVal variable can be moved out of the if-else.
Thise 2 functions produce the wame result for non-reference fields.


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64558/new/

https://reviews.llvm.org/D64558





More information about the cfe-commits mailing list