From: Artem Belevich Date: Fri, 5 Oct 2018 18:39:58 +0000 (+0000) Subject: [CUDA] Use all 64 bits of GUID in __nv_module_id X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=52d4fabea811bf965104a5f6e8f22a55f08b1f03;p=clang [CUDA] Use all 64 bits of GUID in __nv_module_id getGUID() returns an uint64_t and "%x" only prints 32 bits of it. Use PRIx64 format string to print all 64 bits. Differential Revision: https://reviews.llvm.org/D52938 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@343875 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGCUDANV.cpp b/lib/CodeGen/CGCUDANV.cpp index d76076326e..1c578bd151 100644 --- a/lib/CodeGen/CGCUDANV.cpp +++ b/lib/CodeGen/CGCUDANV.cpp @@ -520,7 +520,7 @@ llvm::Function *CGNVCUDARuntime::makeModuleCtorFunction() { // Generate a unique module ID. SmallString<64> ModuleID; llvm::raw_svector_ostream OS(ModuleID); - OS << ModuleIDPrefix << llvm::format("%x", FatbinWrapper->getGUID()); + OS << ModuleIDPrefix << llvm::format("%" PRIx64, FatbinWrapper->getGUID()); llvm::Constant *ModuleIDConstant = makeConstantString(ModuleID.str(), "", ModuleIDSectionName, 32);