SampleProfile.cpp: Fix take #2. The issue was abuse of StringRef here.
llvm-svn: 203996
This commit is contained in:
@@ -972,8 +972,10 @@ unsigned SampleFunctionProfile::getFunctionLoc(Function &F) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Twine Msg = "No debug information found in function " + F.getName();
|
StringRef FnName = F.getName();
|
||||||
F.getContext().diagnose(DiagnosticInfoSampleProfile(Msg));
|
Twine Msg = "No debug information found in function " + FnName;
|
||||||
|
DiagnosticInfoSampleProfile Diag(Msg);
|
||||||
|
F.getContext().diagnose(Diag);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user