Changes in directory llvm/lib/Debugger:

ProgramInfo.cpp updated: 1.16 -> 1.17
---
Log message:

Change Path::getStatusInfo to return a boolean and error string on an error
instead of throwing an exception.  This reduces the amount of code that is
exposed to exceptions (e.g. FileUtilities), though it is clearly only one step
along the way.


---
Diffs of the changes:  (+3 -2)

 ProgramInfo.cpp |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)


Index: llvm/lib/Debugger/ProgramInfo.cpp
diff -u llvm/lib/Debugger/ProgramInfo.cpp:1.16 
llvm/lib/Debugger/ProgramInfo.cpp:1.17
--- llvm/lib/Debugger/ProgramInfo.cpp:1.16      Thu Jul  6 17:34:06 2006
+++ llvm/lib/Debugger/ProgramInfo.cpp   Fri Jul 28 17:03:44 2006
@@ -196,8 +196,9 @@
 
 ProgramInfo::ProgramInfo(Module *m) : M(m), ProgramTimeStamp(0,0) {
   assert(M && "Cannot create program information with a null module!");
-  sys::Path modulePath(M->getModuleIdentifier());
-  ProgramTimeStamp = modulePath.getTimestamp();
+  sys::FileStatus Stat;
+  if (!sys::Path(M->getModuleIdentifier()).getFileStatus(Stat))
+    ProgramTimeStamp = Stat.getTimestamp();
 
   SourceFilesIsComplete = false;
   SourceFunctionsIsComplete = false;



_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to