summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-db/Commands.cpp
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
commit5fb6ee9d6b972ff1dbf2579c7c66f7c404d159dd (patch)
treec9e923df54ec6b19eb2b4b4da89a7df375c11173 /llvm/tools/llvm-db/Commands.cpp
parent0d95160c6dca5220e292500ca9510c961b846b5f (diff)
downloadbcm5719-llvm-5fb6ee9d6b972ff1dbf2579c7c66f7c404d159dd.tar.gz
bcm5719-llvm-5fb6ee9d6b972ff1dbf2579c7c66f7c404d159dd.zip
Avoid temporary construction and potential for corrupted data access.
llvm-svn: 35771
Diffstat (limited to 'llvm/tools/llvm-db/Commands.cpp')
-rw-r--r--llvm/tools/llvm-db/Commands.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/tools/llvm-db/Commands.cpp b/llvm/tools/llvm-db/Commands.cpp
index 487d5ec5360..e0162e39567 100644
--- a/llvm/tools/llvm-db/Commands.cpp
+++ b/llvm/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()) {
OpenPOWER on IntegriCloud