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
This commit is contained in:
NAKAMURA Takumi 2014-03-15 01:56:17 +00:00
parent ba3fc12d80
commit 5d45272acc

View File

@ -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;
}