mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-26 05:25:47 +00:00
SampleProfile.cpp: Quick fix to r203976 about abuse of Twine. The life of Twine was too short.
FIXME: DiagnosticInfoSampleProfile should not hold Twine&. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203990 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -454,8 +454,7 @@ bool SampleModuleProfile::loadText() {
|
|||||||
error_code EC = MemoryBuffer::getFile(Filename, Buffer);
|
error_code EC = MemoryBuffer::getFile(Filename, Buffer);
|
||||||
if (EC) {
|
if (EC) {
|
||||||
std::string Msg(EC.message());
|
std::string Msg(EC.message());
|
||||||
DiagnosticInfoSampleProfile Diag(Filename.data(), Msg);
|
M.getContext().diagnose(DiagnosticInfoSampleProfile(Filename.data(), Msg));
|
||||||
M.getContext().diagnose(Diag);
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
line_iterator LineIt(*Buffer, '#');
|
line_iterator LineIt(*Buffer, '#');
|
||||||
@@ -973,9 +972,8 @@ unsigned SampleFunctionProfile::getFunctionLoc(Function &F) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DiagnosticInfoSampleProfile Diag("No debug information found in function " +
|
Twine Msg = "No debug information found in function " + F.getName();
|
||||||
F.getName());
|
F.getContext().diagnose(DiagnosticInfoSampleProfile(Msg));
|
||||||
F.getContext().diagnose(Diag);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user