[clang] [llvm-profdata] Do not create numerical strings for MD5 function names read from a Sample Profile. (PR #66164)

David Li via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 20 14:04:46 PDT 2023


================
@@ -643,14 +648,11 @@ class SampleContext {
   uint64_t getHashCode() const {
     if (hasContext())
       return hash_value(getContextFrames());
-
-    // For non-context function name, use its MD5 as hash value, so that it is
-    // consistent with the profile map's key.
-    return hashFuncName(getName());
+    return getName().getHashCode();
   }
 
   /// Set the name of the function and clear the current context.
-  void setName(StringRef FunctionName) {
+  void setName(ProfileFuncRef FunctionName) {
----------------
david-xl wrote:

FunctionName --> Function

https://github.com/llvm/llvm-project/pull/66164


More information about the cfe-commits mailing list