forked from OSchip/llvm-project
Avoid temporary construction and potential for corrupted data access.
llvm-svn: 35771
This commit is contained in:
parent
0d95160c6d
commit
5fb6ee9d6b
|
@ -49,10 +49,9 @@ void CLIDebugger::startProgramRunning() {
|
|||
eliminateRunInfo();
|
||||
|
||||
// If the program has been modified, reload it!
|
||||
sys::Path Program(Dbg.getProgramPath());
|
||||
sys::PathWithStatus Program(Dbg.getProgramPath());
|
||||
std::string Err;
|
||||
const sys::FileStatus *Status =
|
||||
sys::PathWithStatus(Program).getFileStatus(false, &Err);
|
||||
const sys::FileStatus *Status = Program.getFileStatus(false, &Err);
|
||||
if (!Status)
|
||||
throw Err;
|
||||
if (TheProgramInfo->getProgramTimeStamp() != Status->getTimestamp()) {
|
||||
|
|
Loading…
Reference in New Issue