From a86545b0b57b55722ba65a4493e313a72ac8d242 Mon Sep 17 00:00:00 2001 From: Xinliang David Li Date: Fri, 11 Dec 2015 20:23:22 +0000 Subject: [PGO] Revert r255365: solution incomplete, not handling lambda yet llvm-svn: 255369 --- llvm/lib/ProfileData/InstrProf.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'llvm/lib/ProfileData/InstrProf.cpp') diff --git a/llvm/lib/ProfileData/InstrProf.cpp b/llvm/lib/ProfileData/InstrProf.cpp index 2608847fd10..a965a1208b5 100644 --- a/llvm/lib/ProfileData/InstrProf.cpp +++ b/llvm/lib/ProfileData/InstrProf.cpp @@ -74,15 +74,14 @@ namespace llvm { std::string getPGOFuncName(StringRef RawFuncName, GlobalValue::LinkageTypes Linkage, - StringRef FileName, uint64_t Version) { + StringRef FileName, + uint64_t Version LLVM_ATTRIBUTE_UNUSED) { // Function names may be prefixed with a binary '1' to indicate // that the backend should not modify the symbols due to any platform // naming convention. Do not include that '1' in the PGO profile name. if (RawFuncName[0] == '\1') RawFuncName = RawFuncName.substr(1); - const char *Unknown = (Version <= 3 ? ":" : "__unknown__"); - const char *Sep = (Version <= 3 ? ":" : "__"); std::string FuncName = RawFuncName; if (llvm::GlobalValue::isLocalLinkage(Linkage)) { @@ -91,9 +90,9 @@ std::string getPGOFuncName(StringRef RawFuncName, // that it will stay the same, e.g., if the files are checked out from // version control in different locations. if (FileName.empty()) - FuncName = FuncName.insert(0, Unknown); + FuncName = FuncName.insert(0, ":"); else - FuncName = FuncName.insert(0, FileName.str() + Sep); + FuncName = FuncName.insert(0, FileName.str() + ":"); } return FuncName; } -- cgit v1.2.3