hliao marked an inline comment as done.
hliao added inline comments.

================
Comment at: clang/lib/Sema/SemaCUDA.cpp:156
+  if (VD->getType()->isCUDADeviceBuiltinSurfaceType() ||
+      VD->getType()->isCUDADeviceBuiltinTextureType())
+    return CFT_HostDevice;
----------------
yaxunl wrote:
> We may need to mark constexpr variables as host device too. In practice such 
> usage has exist for long time.
`cosntexpr` variable is a little bit tricky as it's still possible for that 
variable to be finally emitted as a variable. For example, if its address is 
taken, it won't be optimized away and still needs emitting somewhere. But, like 
other non-local variables, CUDA forbids their initializers. Any suggestion?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79344/new/

https://reviews.llvm.org/D79344



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to