tra added inline comments.
================ Comment at: lib/CodeGen/CGDebugInfo.cpp:4235 CGM.getContext().getTargetAddressSpace(D->getType()); + if (CGM.getLangOpts().CUDA && CGM.getLangOpts().CUDAIsDevice) { + if (D->hasAttr<CUDASharedAttr>()) ---------------- probinson wrote: > Can a variable have one of these CUDA attributes when CUDAIsDevice is false? > I'm just wondering if the extra level of checking is really necessary or > useful. `__shared__` are probably not going to be encountered on the host side, but `__constant__` ones may be. E.g. we may have a global `__constant__` variable which will have a host-side address (it's actually the address of its host-side 'shadow') which may be used by various CUDA functions to refer to it's real device-side instance. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57162/new/ https://reviews.llvm.org/D57162 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits