OSDN Git Service

[ThinLTO] Use decimal suffix for promoted values to match demanglers
authorTeresa Johnson <tejohnson@google.com>
Fri, 29 Sep 2017 15:55:42 +0000 (15:55 +0000)
committerTeresa Johnson <tejohnson@google.com>
Fri, 29 Sep 2017 15:55:42 +0000 (15:55 +0000)
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@314527 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/IR/ModuleSummaryIndex.h

index d1564c1..92dcebe 100644 (file)
@@ -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();
   }