[llvm] r314527 - [ThinLTO] Use decimal suffix for promoted values to match demanglers

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


Author: tejohnson
Date: Fri Sep 29 08:55:42 2017
New Revision: 314527

URL: http://llvm.org/viewvc/llvm-project?rev=314527&view=rev
Log:
[ThinLTO] Use decimal suffix for promoted values to match demanglers

Summary:
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.

Reviewers: danielcdh

Subscribers: llvm-commits, inglorion

Differential Revision: https://reviews.llvm.org/D38405

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

Modified: llvm/trunk/include/llvm/IR/ModuleSummaryIndex.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/ModuleSummaryIndex.h?rev=314527&r1=314526&r2=314527&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/ModuleSummaryIndex.h (original)
+++ llvm/trunk/include/llvm/IR/ModuleSummaryIndex.h Fri Sep 29 08:55:42 2017
@@ -743,7 +743,7 @@ public:
   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();
   }
 




More information about the llvm-commits mailing list