Changes in directory llvm/tools/gccld:
GenerateCode.cpp updated: 1.58 -> 1.59 --- Log message: Use Path::getFileStatus to get status-related info. --- Diffs of the changes: (+5 -7) GenerateCode.cpp | 12 +++++------- 1 files changed, 5 insertions(+), 7 deletions(-) Index: llvm/tools/gccld/GenerateCode.cpp diff -u llvm/tools/gccld/GenerateCode.cpp:1.58 llvm/tools/gccld/GenerateCode.cpp:1.59 --- llvm/tools/gccld/GenerateCode.cpp:1.58 Fri Jun 16 13:23:48 2006 +++ llvm/tools/gccld/GenerateCode.cpp Tue Aug 1 13:04:01 2006 @@ -151,12 +151,9 @@ sys::Path LPath(LibPath); // Make sure it exists and is a directory - try { - if (!LPath.exists() || !LPath.isDirectory()) - return false; - } catch (std::string& xcptn) { + sys::FileStatus Status; + if (LPath.getFileStatus(Status) || !Status.isDir) return false; - } // Grab the contents of the -L path std::set<sys::Path> Files; @@ -169,12 +166,13 @@ std::string dllsuffix = sys::Path::GetDLLSuffix(); for (; File != Files.end(); ++File) { - if ( File->isDirectory() ) + // Not a file? + if (File->getFileStatus(Status) || Status.isDir) continue; std::string path = File->toString(); - // Check for an ending '.dll,.so' or '.a' suffix as all + // Check for an ending '.dll', '.so' or '.a' suffix as all // other files are not of interest to us here if (path.find(dllsuffix, path.size()-dllsuffix.size()) == std::string::npos && path.find(".a", path.size()-2) == std::string::npos) _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits