yaxunl added a comment. In D102237#2767052 <https://reviews.llvm.org/D102237#2767052>, @tra wrote:
> Sam, this patch has apparently triggered some unwanted side effects. I'm > still reducing the failures to something that could be used for debugging, > but the rough symptoms are: > > We now end up emitting the code for the host-only static member functions of > instantiated class templates during device-side compilation. > Clang now complains about not allowed nontrivial static initializers for some > variables in class templates. In D102237#2767052 <https://reviews.llvm.org/D102237#2767052>, @tra wrote: > Sam, this patch has apparently triggered some unwanted side effects. I'm > still reducing the failures to something that could be used for debugging, > but the rough symptoms are: > > We now end up emitting the code for the host-only static member functions of > instantiated class templates during device-side compilation. > Clang now complains about not allowed nontrivial static initializers for some > variables in class templates. We limit the variables to device or constant variables, e.g. https://godbolt.org/z/seh1n7KnY xxx is emitted because it is implicitly constant, but yyy is not emitted. It would be interesting to know what kind of variables are emitted. Would you like the change reverted? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102237/new/ https://reviews.llvm.org/D102237 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits