yaxunl added inline comments.
================ Comment at: lib/CodeGen/CGCUDANV.cpp:475-476 return nullptr; + if (IsHIP && EmittedKernels.empty() && DeviceVars.empty()) + return nullptr; // void __{cuda|hip}_register_globals(void* handle); ---------------- tra wrote: > I think this would make sense for CUDA, too. https://github.com/llvm-mirror/clang/blob/master/lib/CodeGen/CGCUDANV.cpp#L482 CUDA generates a dummy register function call for -fgpu-rdc. So probably only do this when RelocatableDeviceCode is false for CUDA? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60141/new/ https://reviews.llvm.org/D60141 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits