ABataev added inline comments.
================ Comment at: clang/lib/CodeGen/CGDecl.cpp:1606 + CGOpenMPRuntimeGPU &RT = + *(static_cast<CGOpenMPRuntimeGPU *>(&CGM.getOpenMPRuntime())); + if (RT.isDelayedVariableLengthDecl(*this, &D)) { ---------------- ABataev wrote: > 1. use `static_cast<CGOpenMPRuntimeGPU &>(CGM.getOpenMPRuntime())` > 2. It will crash if your device is not GPU. Better to make > `getKmpcAllocShared` and `getKmpcFreeShared` virtual (just like > `isDelayedVariableLengthDecl`) in base CGOpenMPRuntime, since it may be > required not only for GPU-based devices. Check the second item, please, better to make all new member function virtual and handle it for non-GPU devices too 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