diff options
author | Artem Belevich <tra@google.com> | 2018-10-05 18:39:58 +0000 |
---|---|---|
committer | Artem Belevich <tra@google.com> | 2018-10-05 18:39:58 +0000 |
commit | 93552b39c952959120655984ce1f437b821dff57 (patch) | |
tree | ba05f5a5dc1b00fb92706b5415db33229d832d70 /clang/lib/CodeGen | |
parent | fb43114ba25f81b3c22a8cb27c532b559100d63a (diff) | |
download | bcm5719-llvm-93552b39c952959120655984ce1f437b821dff57.tar.gz bcm5719-llvm-93552b39c952959120655984ce1f437b821dff57.zip |
[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
llvm-svn: 343875
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r-- | clang/lib/CodeGen/CGCUDANV.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGCUDANV.cpp b/clang/lib/CodeGen/CGCUDANV.cpp index d76076326e4..1c578bd151b 100644 --- a/clang/lib/CodeGen/CGCUDANV.cpp +++ b/clang/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); |