================ @@ -415,6 +422,75 @@ Error YAMLProfileReader::readProfile(BinaryContext &BC) { if (!YamlBF.Used && BF && !ProfiledFunctions.count(BF)) matchProfileToFunction(YamlBF, *BF); + // Uses name similarity to match functions that were not matched by name. + uint64_t MatchedWithDemangledName = 0; + + if (opts::NameSimilarityFunctionMatchingThreshold > 0) { + auto DemangleName = [&](const char* String) { + int Status = 0; + char *DemangledName = abi::__cxa_demangle(String, + nullptr, nullptr, &Status); + return Status == 0 ? new std::string(DemangledName) : nullptr; + }; + + auto DeriveNameSpace = [&](std::string DemangledName) { ---------------- aaupov wrote:
Would be cool to use `getFunctionDeclContextName` from ItaniumPartialDemangler https://github.com/llvm/llvm-project/pull/95884 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits