diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2007-04-08 20:06:05 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2007-04-08 20:06:05 +0000 |
commit | 7b57fe3554d29c218d6c25df66ecb2c7cad21353 (patch) | |
tree | 8df0d0453acdcb2366516cad0f879b746e37dfec /tools/llvm-db | |
parent | 84c8a9c5923403564eb2f9ca78e1e343112b4a87 (diff) | |
download | external_llvm-7b57fe3554d29c218d6c25df66ecb2c7cad21353.zip external_llvm-7b57fe3554d29c218d6c25df66ecb2c7cad21353.tar.gz external_llvm-7b57fe3554d29c218d6c25df66ecb2c7cad21353.tar.bz2 |
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
Diffstat (limited to 'tools/llvm-db')
-rw-r--r-- | tools/llvm-db/Commands.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tools/llvm-db/Commands.cpp b/tools/llvm-db/Commands.cpp index 487d5ec..e0162e3 100644 --- a/tools/llvm-db/Commands.cpp +++ b/tools/llvm-db/Commands.cpp @@ -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()) { |