forked from OSchip/llvm-project
SampleProfile.cpp: Fix take #2. The issue was abuse of StringRef here.
llvm-svn: 203996
This commit is contained in:
parent
98de59157c
commit
6cf7e5d341
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue