diff options
| -rw-r--r-- | llvm/include/llvm/ProfileData/InstrProf.h | 4 | ||||
| -rw-r--r-- | llvm/lib/ProfileData/InstrProf.cpp | 11 |
2 files changed, 8 insertions, 7 deletions
diff --git a/llvm/include/llvm/ProfileData/InstrProf.h b/llvm/include/llvm/ProfileData/InstrProf.h index 2c11cb8975d..4e4d1cb6a22 100644 --- a/llvm/include/llvm/ProfileData/InstrProf.h +++ b/llvm/include/llvm/ProfileData/InstrProf.h @@ -174,7 +174,7 @@ std::string getPGOFuncNameVarName(StringRef FuncName, /// Create and return the global variable for function name used in PGO /// instrumentation. \c FuncName is the name of the function returned /// by \c getPGOFuncName call. -GlobalVariable *createPGOFuncNameVar(Function &F, StringRef FuncName); +GlobalVariable *createPGOFuncNameVar(Function &F, StringRef PGOFuncName); /// Create and return the global variable for function name used in PGO /// instrumentation. /// \c FuncName is the name of the function @@ -182,7 +182,7 @@ GlobalVariable *createPGOFuncNameVar(Function &F, StringRef FuncName); /// and \c Linkage is the linkage of the instrumented function. GlobalVariable *createPGOFuncNameVar(Module &M, GlobalValue::LinkageTypes Linkage, - StringRef FuncName); + StringRef PGOFuncName); /// Return the initializer in string of the PGO name var \c NameVar. StringRef getPGOFuncNameVarInitializer(GlobalVariable *NameVar); diff --git a/llvm/lib/ProfileData/InstrProf.cpp b/llvm/lib/ProfileData/InstrProf.cpp index cec63005ed3..2446521a5bc 100644 --- a/llvm/lib/ProfileData/InstrProf.cpp +++ b/llvm/lib/ProfileData/InstrProf.cpp @@ -119,7 +119,7 @@ std::string getPGOFuncNameVarName(StringRef FuncName, GlobalVariable *createPGOFuncNameVar(Module &M, GlobalValue::LinkageTypes Linkage, - StringRef FuncName) { + StringRef PGOFuncName) { // We generally want to match the function's linkage, but available_externally // and extern_weak both have the wrong semantics, and anything that doesn't @@ -132,10 +132,11 @@ GlobalVariable *createPGOFuncNameVar(Module &M, Linkage == GlobalValue::ExternalLinkage) Linkage = GlobalValue::PrivateLinkage; - auto *Value = ConstantDataArray::getString(M.getContext(), FuncName, false); + auto *Value = + ConstantDataArray::getString(M.getContext(), PGOFuncName, false); auto FuncNameVar = new GlobalVariable(M, Value->getType(), true, Linkage, Value, - getPGOFuncNameVarName(FuncName, Linkage)); + getPGOFuncNameVarName(PGOFuncName, Linkage)); // Hide the symbol so that we correctly get a copy for each executable. if (!GlobalValue::isLocalLinkage(FuncNameVar->getLinkage())) @@ -144,8 +145,8 @@ GlobalVariable *createPGOFuncNameVar(Module &M, return FuncNameVar; } -GlobalVariable *createPGOFuncNameVar(Function &F, StringRef FuncName) { - return createPGOFuncNameVar(*F.getParent(), F.getLinkage(), FuncName); +GlobalVariable *createPGOFuncNameVar(Function &F, StringRef PGOFuncName) { + return createPGOFuncNameVar(*F.getParent(), F.getLinkage(), PGOFuncName); } void InstrProfSymtab::create(const Module &M) { |

