mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-28 19:31:58 +00:00
Avoid temporary construction and potential for corrupted data access.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35771 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
84c8a9c592
commit
7b57fe3554
@ -49,10 +49,9 @@ void CLIDebugger::startProgramRunning() {
|
|||||||
eliminateRunInfo();
|
eliminateRunInfo();
|
||||||
|
|
||||||
// If the program has been modified, reload it!
|
// If the program has been modified, reload it!
|
||||||
sys::Path Program(Dbg.getProgramPath());
|
sys::PathWithStatus Program(Dbg.getProgramPath());
|
||||||
std::string Err;
|
std::string Err;
|
||||||
const sys::FileStatus *Status =
|
const sys::FileStatus *Status = Program.getFileStatus(false, &Err);
|
||||||
sys::PathWithStatus(Program).getFileStatus(false, &Err);
|
|
||||||
if (!Status)
|
if (!Status)
|
||||||
throw Err;
|
throw Err;
|
||||||
if (TheProgramInfo->getProgramTimeStamp() != Status->getTimestamp()) {
|
if (TheProgramInfo->getProgramTimeStamp() != Status->getTimestamp()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user