[PATCH] D102237: [CUDA][HIP] Fix non-ODR-use of static device variable

Yaxun Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 11 07:15:10 PDT 2021


yaxunl created this revision.
yaxunl added a reviewer: tra.
yaxunl requested review of this revision.

Currently non-ODR-use of static device variable by host code
causes static device variable to be emitted and registered,
which should not.

This patch fixes that.


https://reviews.llvm.org/D102237

Files:
  clang/lib/Sema/SemaExpr.cpp
  clang/test/CodeGenCUDA/static-device-var-no-rdc.cu
  clang/test/CodeGenCUDA/static-device-var-rdc.cu

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102237.344389.patch
Type: text/x-patch
Size: 6904 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210511/b6d24945/attachment.bin>


More information about the cfe-commits mailing list