[llvm] [llvm-profdata] Do not create numerical strings for MD5 function names read from a Sample Profile. (PR #66164)
    via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Wed Sep 13 00:11:21 PDT 2023
    
    
  
================
@@ -48,6 +52,8 @@ namespace llvm {
   /// lifetime extends past that of the StringRef. For this reason, it is not in
   /// general safe to store a StringRef.
   class LLVM_GSL_POINTER StringRef {
+    friend class llvm::sampleprof::ProfileFuncName;
----------------
WenleiHe wrote:
This is no-go. ADT should stay clear of its users, and ProfiledFuncName should not need to access private members. 
https://github.com/llvm/llvm-project/pull/66164
    
    
More information about the llvm-commits
mailing list