[PATCH] D102801: [CUDA][HIP] Fix implicit constant variable

2021-05-19 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. This patch does not appear to fix the second regression introduced by the D102237 . Trying to compile the following code triggers an assertion in CGExpr.cpp: class a { public: a(char *); }; void b() { [](char *c) { sta

[PATCH] D102801: [CUDA][HIP] Fix implicit constant variable

2021-05-19 Thread Artem Belevich via Phabricator via cfe-commits
tra added a reviewer: rsmith. tra added a subscriber: rsmith. tra added a comment. Tentative LGTM as we need it to fix the regression soon. Summoning @rsmith for the 'big picture' opinion. While the patch may fix this particular regression, I wonder if there's a better way to deal with this. We

[PATCH] D102801: [CUDA][HIP] Fix implicit constant variable

2021-05-19 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added a reviewer: tra. Herald added a reviewer: aaron.ballman. yaxunl requested review of this revision. constexpr variables are implicit constant variables in device compilation. Not all constexpr variables are valid to be emitted on device side, therefore we