[PATCH] D39443: [ThinLTO] Double bits of module hash used for renaming

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 31 05:56:50 PDT 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL316996: [ThinLTO] Double bits of module hash used for renaming (authored by tejohnson).

Repository:
  rL LLVM

https://reviews.llvm.org/D39443

Files:
  llvm/trunk/include/llvm/IR/ModuleSummaryIndex.h


Index: llvm/trunk/include/llvm/IR/ModuleSummaryIndex.h
===================================================================
--- llvm/trunk/include/llvm/IR/ModuleSummaryIndex.h
+++ llvm/trunk/include/llvm/IR/ModuleSummaryIndex.h
@@ -743,7 +743,8 @@
   static std::string getGlobalNameForLocal(StringRef Name, ModuleHash ModHash) {
     SmallString<256> NewName(Name);
     NewName += ".llvm.";
-    NewName += utostr(ModHash[0]); // Take the first 32 bits
+    NewName += utostr((uint64_t(ModHash[0]) << 32) |
+                      ModHash[1]); // Take the first 64 bits
     return NewName.str();
   }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39443.120970.patch
Type: text/x-patch
Size: 604 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171031/b4f1444d/attachment.bin>


More information about the llvm-commits mailing list