diff options
author | NAKAMURA Takumi <geek4civic@gmail.com> | 2014-03-15 01:56:17 +0000 |
---|---|---|
committer | NAKAMURA Takumi <geek4civic@gmail.com> | 2014-03-15 01:56:17 +0000 |
commit | 6cf7e5d341eb1caba169681b537e714abf35159c (patch) | |
tree | 1df5f165758a675d5bb57a46deecc96eb99a3f4b /llvm/lib/Transforms/Scalar/SampleProfile.cpp | |
parent | 98de59157c2a37e765b35bae0886819c80099986 (diff) | |
download | bcm5719-llvm-6cf7e5d341eb1caba169681b537e714abf35159c.tar.gz bcm5719-llvm-6cf7e5d341eb1caba169681b537e714abf35159c.zip |
SampleProfile.cpp: Fix take #2. The issue was abuse of StringRef here.
llvm-svn: 203996
Diffstat (limited to 'llvm/lib/Transforms/Scalar/SampleProfile.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/SampleProfile.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/SampleProfile.cpp b/llvm/lib/Transforms/Scalar/SampleProfile.cpp index ba8d223c854..2edcceede58 100644 --- a/llvm/lib/Transforms/Scalar/SampleProfile.cpp +++ b/llvm/lib/Transforms/Scalar/SampleProfile.cpp @@ -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; } |