[llvm-commits] CVS: llvm/lib/Debugger/ProgramInfo.cpp
Reid Spencer
reid at x10sys.com
Thu Mar 29 12:06:34 PDT 2007
Changes in directory llvm/lib/Debugger:
ProgramInfo.cpp updated: 1.20 -> 1.21
---
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: (+4 -3)
ProgramInfo.cpp | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
Index: llvm/lib/Debugger/ProgramInfo.cpp
diff -u llvm/lib/Debugger/ProgramInfo.cpp:1.20 llvm/lib/Debugger/ProgramInfo.cpp:1.21
--- llvm/lib/Debugger/ProgramInfo.cpp:1.20 Thu Dec 7 14:28:15 2006
+++ llvm/lib/Debugger/ProgramInfo.cpp Thu Mar 29 14:05:44 2007
@@ -194,9 +194,10 @@
ProgramInfo::ProgramInfo(Module *m) : M(m), ProgramTimeStamp(0,0) {
assert(M && "Cannot create program information with a null module!");
- sys::FileStatus Stat;
- if (!sys::Path(M->getModuleIdentifier()).getFileStatus(Stat))
- ProgramTimeStamp = Stat.getTimestamp();
+ const sys::FileStatus *Stat;
+ Stat = sys::Path(M->getModuleIdentifier()).getFileStatus();
+ if (Stat)
+ ProgramTimeStamp = Stat->getTimestamp();
SourceFilesIsComplete = false;
SourceFunctionsIsComplete = false;
More information about the llvm-commits
mailing list