Skip to content
This repository was archived by the owner on Feb 5, 2019. It is now read-only.

Commit 5d45272

Browse files
committed
SampleProfile.cpp: Fix take #2. The issue was abuse of StringRef here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203996 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent ba3fc12 commit 5d45272

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/Transforms/Scalar/SampleProfile.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -972,8 +972,10 @@ unsigned SampleFunctionProfile::getFunctionLoc(Function &F) {
972972
}
973973
}
974974

975-
Twine Msg = "No debug information found in function " + F.getName();
976-
F.getContext().diagnose(DiagnosticInfoSampleProfile(Msg));
975+
StringRef FnName = F.getName();
976+
Twine Msg = "No debug information found in function " + FnName;
977+
DiagnosticInfoSampleProfile Diag(Msg);
978+
F.getContext().diagnose(Diag);
977979
return 0;
978980
}
979981

0 commit comments

Comments
 (0)