Change error to warning when a profile cannot be found.

When the profile for a function cannot be applied, we use to emit an
error. This seems extreme. The compiler can continue, it's just that the
optimization opportunities won't include profile information.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220386 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Diego Novillo
2014-10-22 13:36:35 +00:00
parent 013cbf2f1a
commit 79ca2c234d
2 changed files with 5 additions and 3 deletions

View File

@ -673,7 +673,9 @@ unsigned SampleProfileLoader::getFunctionLoc(Function &F) {
// If could not find the start of \p F, emit a diagnostic to inform the user
// about the missed opportunity.
F.getContext().diagnose(DiagnosticInfoSampleProfile(
"No debug information found in function " + F.getName()));
"No debug information found in function " + F.getName() +
": Function profile not used",
DS_Warning));
return 0;
}