[PATCH] D38405: [ThinLTO] Use decimal suffix for promoted values to match demanglers

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 29 08:08:42 PDT 2017


tejohnson created this revision.
Herald added a subscriber: inglorion.

Demanglers such as libiberty know how to strip suffixes of the form
\.[a-zA-Z]+\.\d+, but our current promoted value suffixes are
.llvm.${modulehash}, where the module hash is in hex. Change the
module hash to decimal to allow demanglers to handle this.


https://reviews.llvm.org/D38405

Files:
  include/llvm/IR/ModuleSummaryIndex.h


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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38405.117147.patch
Type: text/x-patch
Size: 520 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170929/6b7bb145/attachment.bin>


More information about the llvm-commits mailing list