[PATCH] D141350: Fix runtime problem for base class member data used in target region.

Alexey Bataev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 10 02:49:52 PST 2023


ABataev added inline comments.


================
Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:8490
+    if (MD)
+      if (const CXXRecordDecl *RD = dyn_cast<CXXRecordDecl>(MD->getParent()))
+        HasBaseClass = RD->getNumBases() > 0;
----------------
`const auto *RD = dyn_cast<CXXRecordDecl>(MD->getParent())`. Also, can we use `MD->getParent()->getAsCXXRecordDecl()`?


================
Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:8493
     // There should not be a mapper for a combined entry.
+    if (MD && HasBaseClass) {
+      // OpenMP 5.2 148:21:
----------------
MD is true if HasBaseClass is true


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D141350



More information about the cfe-commits mailing list