doru1004 added inline comments.
================ Comment at: clang/lib/CodeGen/CGDecl.cpp:1605-1606 + if (getLangOpts().OpenMPIsDevice) { + CGOpenMPRuntimeGPU &RT = + *(static_cast<CGOpenMPRuntimeGPU *>(&CGM.getOpenMPRuntime())); + if (RT.isDelayedVariableLengthDecl(*this, &D)) { ---------------- ABataev wrote: > No need to cast to CGOpenMPRuntimeGPU since isDelayedVariableLengthDecl is a > member of CGOpenMPRuntime. RT is also used further down to call getKmpcAllocShared(). ================ Comment at: clang/lib/CodeGen/CodeGenFunction.h:2806 + /// Return true if all the emissions for the VLA size have occured. + bool hasVLASize(const VariableArrayType *type); + ---------------- ABataev wrote: > doru1004 wrote: > > ABataev wrote: > > > 1. Is it possible that VariableArrayType does not have VLA size? > > > 2. Fix param name > > @ABataev How would point 1 happen? > You're adding a function that checks if VLA type has VLA size. I'm asking, if > it is possible for VLA type to not have VLA size at all? Why do you need this > function? This function checks if the expression of the size of the VLA has already been emitted and can be used. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153883/new/ https://reviews.llvm.org/D153883 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits