diff options
author | Chris Lattner <sabre@nondot.org> | 2006-07-28 22:03:44 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-07-28 22:03:44 +0000 |
commit | 252ad03d7db0add504fdcc6bd67c1bc1e28bdd57 (patch) | |
tree | b53953cdbf21813671a66e76191e4bd39c4bf6e7 /lib/Debugger | |
parent | 3236ced25f152ca3035b335008056cd91af5f8bf (diff) | |
download | external_llvm-252ad03d7db0add504fdcc6bd67c1bc1e28bdd57.zip external_llvm-252ad03d7db0add504fdcc6bd67c1bc1e28bdd57.tar.gz external_llvm-252ad03d7db0add504fdcc6bd67c1bc1e28bdd57.tar.bz2 |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29395 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Debugger')
-rw-r--r-- | lib/Debugger/ProgramInfo.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Debugger/ProgramInfo.cpp b/lib/Debugger/ProgramInfo.cpp index 66d38f7..b60f5fc 100644 --- a/lib/Debugger/ProgramInfo.cpp +++ b/lib/Debugger/ProgramInfo.cpp @@ -196,8 +196,9 @@ void SourceFunctionInfo::getSourceLocation(unsigned &RetLineNo, 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; |