This revision was automatically updated to reflect the committed changes. Closed by commit rL335880: [CUDA] Place all CUDA sections in __NV_CUDA segment on Mac. (authored by tra, committed by ). Herald added a subscriber: llvm-commits.
Changed prior to commit: https://reviews.llvm.org/D48615?vs=152979&id=153347#toc Repository: rL LLVM https://reviews.llvm.org/D48615 Files: cfe/trunk/lib/CodeGen/CGCUDANV.cpp Index: cfe/trunk/lib/CodeGen/CGCUDANV.cpp =================================================================== --- cfe/trunk/lib/CodeGen/CGCUDANV.cpp +++ cfe/trunk/lib/CodeGen/CGCUDANV.cpp @@ -389,17 +389,19 @@ FatMagic = HIPFatMagic; } else { if (RelocatableDeviceCode) - // TODO: Figure out how this is called on mac OS! - FatbinConstantName = "__nv_relfatbin"; + FatbinConstantName = CGM.getTriple().isMacOSX() + ? "__NV_CUDA,__nv_relfatbin" + : "__nv_relfatbin"; else FatbinConstantName = CGM.getTriple().isMacOSX() ? "__NV_CUDA,__nv_fatbin" : ".nv_fatbin"; // NVIDIA's cuobjdump looks for fatbins in this section. FatbinSectionName = CGM.getTriple().isMacOSX() ? "__NV_CUDA,__fatbin" : ".nvFatBinSegment"; - // TODO: Figure out how this is called on mac OS! - ModuleIDSectionName = "__nv_module_id"; + ModuleIDSectionName = CGM.getTriple().isMacOSX() + ? "__NV_CUDA,__nv_module_id" + : "__nv_module_id"; ModuleIDPrefix = "__nv_"; // For CUDA, create a string literal containing the fat binary loaded from
Index: cfe/trunk/lib/CodeGen/CGCUDANV.cpp =================================================================== --- cfe/trunk/lib/CodeGen/CGCUDANV.cpp +++ cfe/trunk/lib/CodeGen/CGCUDANV.cpp @@ -389,17 +389,19 @@ FatMagic = HIPFatMagic; } else { if (RelocatableDeviceCode) - // TODO: Figure out how this is called on mac OS! - FatbinConstantName = "__nv_relfatbin"; + FatbinConstantName = CGM.getTriple().isMacOSX() + ? "__NV_CUDA,__nv_relfatbin" + : "__nv_relfatbin"; else FatbinConstantName = CGM.getTriple().isMacOSX() ? "__NV_CUDA,__nv_fatbin" : ".nv_fatbin"; // NVIDIA's cuobjdump looks for fatbins in this section. FatbinSectionName = CGM.getTriple().isMacOSX() ? "__NV_CUDA,__fatbin" : ".nvFatBinSegment"; - // TODO: Figure out how this is called on mac OS! - ModuleIDSectionName = "__nv_module_id"; + ModuleIDSectionName = CGM.getTriple().isMacOSX() + ? "__NV_CUDA,__nv_module_id" + : "__nv_module_id"; ModuleIDPrefix = "__nv_"; // For CUDA, create a string literal containing the fat binary loaded from
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits