[PATCH] D138614: [Clang][OpenMP][AMDGPU] Fix capture of variably modified type alias in teams distribute

Gheorghe-Teodor Bercea via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 29 10:29:11 PST 2022


doru1004 added inline comments.


================
Comment at: clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp:243
         if (!FD->getType()->isReferenceType()) {
-          assert(!VD->getType()->isVariablyModifiedType() &&
+          bool isVMT = VD->getType()->isVariablyModifiedType();
+          assert((!isVMT || (isVMT && !IsForCombinedParallelRegion)) &&
----------------
ABataev wrote:
> Is it for pointers only? Or for other types too?
I am not sure about that distinction; it allows for the same types as before except that when the directive is not a combined parallel for directive it returns immediately because the variable will then have to be captured and shared.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D138614



More information about the cfe-commits mailing list