summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Debugger/ProgramInfo.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-07-28 22:03:44 +0000
committerChris Lattner <sabre@nondot.org>2006-07-28 22:03:44 +0000
commit4857253d98638b9d5aedd1e4b854b8a2f61ff114 (patch)
tree0547c61f3117040e6c9642ac2a5e30f9349aafa5 /llvm/lib/Debugger/ProgramInfo.cpp
parent6da9d8ecf9fee8e64f922021592e3aeb1a2445bf (diff)
downloadbcm5719-llvm-4857253d98638b9d5aedd1e4b854b8a2f61ff114.tar.gz
bcm5719-llvm-4857253d98638b9d5aedd1e4b854b8a2f61ff114.zip
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. llvm-svn: 29395
Diffstat (limited to 'llvm/lib/Debugger/ProgramInfo.cpp')
-rw-r--r--llvm/lib/Debugger/ProgramInfo.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Debugger/ProgramInfo.cpp b/llvm/lib/Debugger/ProgramInfo.cpp
index 66d38f73ca8..b60f5fc4bcf 100644
--- a/llvm/lib/Debugger/ProgramInfo.cpp
+++ b/llvm/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;
OpenPOWER on IntegriCloud