summaryrefslogtreecommitdiff
path: root/tools/llvm-db
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-04-08 20:06:05 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-04-08 20:06:05 +0000
commit7b57fe3554d29c218d6c25df66ecb2c7cad21353 (patch)
tree8df0d0453acdcb2366516cad0f879b746e37dfec /tools/llvm-db
parent84c8a9c5923403564eb2f9ca78e1e343112b4a87 (diff)
downloadllvm-7b57fe3554d29c218d6c25df66ecb2c7cad21353.tar.gz
llvm-7b57fe3554d29c218d6c25df66ecb2c7cad21353.tar.bz2
llvm-7b57fe3554d29c218d6c25df66ecb2c7cad21353.tar.xz
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.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/tools/llvm-db/Commands.cpp b/tools/llvm-db/Commands.cpp
index 487d5ec536..e0162e3956 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()) {