yaxunl added inline comments.

================
Comment at: include/clang/Basic/TargetInfo.h:1157
+  /// language address space.
+  virtual LangAS getCUDABuiltinAddressSpace(unsigned AS) const {
+    return getLangASFromTargetAS(AS);
----------------
I think this function is not needed.

Although CUDA/HIP uses address spaces in codegen, but it does not use named 
address spaces in sema and AST. Named address space is not in the AST types of 
CUDA/HIP, therefore there is no point of mapping target address space back to 
language address space for CUDA/HIP.

CUDA/HIP should be just like other address-space-agnostic language and always 
use getLangASFromTargetAS(AS).


https://reviews.llvm.org/D47154



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

Reply via email to