tschuett added a comment. It feels like you are doing codegen(OpenCL kernel) in Sema. Are OpenCL kernels the only approach. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71016/new/ https://reviews.llvm.org/D71016