Avoid temporary construction and potential for corrupted data access.

llvm-svn: 35771
This commit is contained in:
Reid Spencer 2007-04-08 20:06:05 +00:00
parent 0d95160c6d
commit 5fb6ee9d6b
1 changed files with 2 additions and 3 deletions

View File

@ -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()) {