Skip to content

Commit

Permalink
[PGO] Fix dead StringRef access
Browse files Browse the repository at this point in the history
This commit fixes a dead StringRef access introduced in
https://reviews.llvm.org/D149324
  • Loading branch information
Dinistro committed Apr 27, 2023
1 parent efe5e2b commit c67079f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,7 @@ template <class Edge, class BBInfo>
void FuncPGOInstrumentation<Edge, BBInfo>::renameComdatFunction() {
if (!canRenameComdat(F, ComdatMembers))
return;
StringRef OrigName = F.getName();
std::string OrigName = F.getName().str();
std::string NewFuncName =
Twine(F.getName() + "." + Twine(FunctionHash)).str();
F.setName(Twine(NewFuncName));
Expand Down

0 comments on commit c67079f

Please sign in to comment.