Skip to content
This repository has been archived by the owner on Apr 23, 2020. It is now read-only.

Commit

Permalink
SampleProfile.cpp: Fix take #2. The issue was abuse of StringRef here.
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203996 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
chapuni committed Mar 15, 2014
1 parent ba3fc12 commit 5d45272
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/Transforms/Scalar/SampleProfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -972,8 +972,10 @@ unsigned SampleFunctionProfile::getFunctionLoc(Function &F) {
}
}

Twine Msg = "No debug information found in function " + F.getName();
F.getContext().diagnose(DiagnosticInfoSampleProfile(Msg));
StringRef FnName = F.getName();
Twine Msg = "No debug information found in function " + FnName;
DiagnosticInfoSampleProfile Diag(Msg);
F.getContext().diagnose(Diag);
return 0;
}

Expand Down

0 comments on commit 5d45272

Please sign in to comment.