[llvm-commits] CVS: llvm/tools/llvm-db/Commands.cpp
Reid Spencer
reid at x10sys.com
Thu Mar 29 12:06:33 PDT 2007
Changes in directory llvm/tools/llvm-db:
Commands.cpp updated: 1.10 -> 1.11
---
Log message:
For PR789: http://llvm.org/PR789 :
Make the sys::Path::getFileStatus function more efficient by having it
return a pointer to the FileStatus structure rather than copy it. Adjust
uses of the function accordingly. Also, fix some memory issues in sys::Path.
---
Diffs of the changes: (+3 -3)
Commands.cpp | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
Index: llvm/tools/llvm-db/Commands.cpp
diff -u llvm/tools/llvm-db/Commands.cpp:1.10 llvm/tools/llvm-db/Commands.cpp:1.11
--- llvm/tools/llvm-db/Commands.cpp:1.10 Fri Jul 28 17:03:44 2006
+++ llvm/tools/llvm-db/Commands.cpp Thu Mar 29 14:05:44 2007
@@ -50,11 +50,11 @@
// If the program has been modified, reload it!
sys::Path Program(Dbg.getProgramPath());
- sys::FileStatus Status;
std::string Err;
- if (Program.getFileStatus(Status, &Err))
+ const sys::FileStatus *Status = Program.getFileStatus(false, &Err);
+ if (!Status)
throw Err;
- if (TheProgramInfo->getProgramTimeStamp() != Status.getTimestamp()) {
+ if (TheProgramInfo->getProgramTimeStamp() != Status->getTimestamp()) {
std::cout << "'" << Program << "' has changed; re-reading program.\n";
// Unload an existing program. This kills the program if necessary.
More information about the llvm-commits
mailing list