Changes in directory llvm/lib/System/Unix:
Path.inc updated: 1.55 -> 1.56 --- Log message: For PR797: http://llvm.org/PR797 : Remove exception throwing from Path::getDirectoryContents and its users. --- Diffs of the changes: (+8 -5) Path.inc | 13 ++++++++----- 1 files changed, 8 insertions(+), 5 deletions(-) Index: llvm/lib/System/Unix/Path.inc diff -u llvm/lib/System/Unix/Path.inc:1.55 llvm/lib/System/Unix/Path.inc:1.56 --- llvm/lib/System/Unix/Path.inc:1.55 Tue Aug 22 19:39:35 2006 +++ llvm/lib/System/Unix/Path.inc Wed Aug 23 01:56:27 2006 @@ -415,10 +415,12 @@ } bool -Path::getDirectoryContents(std::set<Path>& result) const { +Path::getDirectoryContents(std::set<Path>& result, std::string* ErrMsg) const { DIR* direntries = ::opendir(path.c_str()); - if (direntries == 0) - ThrowErrno(path + ": can't open directory"); + if (direntries == 0) { + MakeErrMsg(ErrMsg, path + ": can't open directory"); + return true; + } std::string dirPath = path; if (!lastIsSlash(dirPath)) @@ -433,14 +435,15 @@ if (0 != lstat(aPath.path.c_str(), &st)) { if (S_ISLNK(st.st_mode)) continue; // dangling symlink -- ignore - ThrowErrno(aPath.path + ": can't determine file object type"); + MakeErrMsg(ErrMsg, aPath.path + ": can't determine file object type"); + return true; } result.insert(aPath); } } closedir(direntries); - return true; + return false; } bool _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits