[llvm] r184298 - Remove Path::canExecute.
Rafael Espindola
rafael.espindola at gmail.com
Wed Jun 19 06:25:31 PDT 2013
Author: rafael
Date: Wed Jun 19 08:25:31 2013
New Revision: 184298
URL: http://llvm.org/viewvc/llvm-project?rev=184298&view=rev
Log:
Remove Path::canExecute.
Modified:
llvm/trunk/include/llvm/Support/PathV1.h
llvm/trunk/lib/Support/Unix/Path.inc
llvm/trunk/lib/Support/Windows/Path.inc
Modified: llvm/trunk/include/llvm/Support/PathV1.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/PathV1.h?rev=184298&r1=184297&r2=184298&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/PathV1.h (original)
+++ llvm/trunk/include/llvm/Support/PathV1.h Wed Jun 19 08:25:31 2013
@@ -274,14 +274,6 @@ namespace sys {
/// @brief Determines if the file is a regular file
bool isRegularFile() const;
- /// This function determines if the path name references an executable
- /// file in the file system. This function checks for the existence and
- /// executability (by the current program) of the file.
- /// @returns true if the pathname references an executable file.
- /// @brief Determines if the path is an executable file in the file
- /// system.
- bool canExecute() const;
-
/// This function builds a list of paths that are the names of the
/// files and directories in a directory.
/// @returns true if an error occurs, true otherwise
Modified: llvm/trunk/lib/Support/Unix/Path.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Unix/Path.inc?rev=184298&r1=184297&r2=184298&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Unix/Path.inc (original)
+++ llvm/trunk/lib/Support/Unix/Path.inc Wed Jun 19 08:25:31 2013
@@ -338,18 +338,6 @@ Path::isRegularFile() const {
return false;
}
-bool
-Path::canExecute() const {
- if (0 != access(path.c_str(), R_OK | X_OK ))
- return false;
- struct stat buf;
- if (0 != stat(path.c_str(), &buf))
- return false;
- if (!S_ISREG(buf.st_mode))
- return false;
- return true;
-}
-
const FileStatus *
PathWithStatus::getFileStatus(bool update, std::string *ErrStr) const {
if (!fsIsValid || update) {
Modified: llvm/trunk/lib/Support/Windows/Path.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Windows/Path.inc?rev=184298&r1=184297&r2=184298&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Windows/Path.inc (original)
+++ llvm/trunk/lib/Support/Windows/Path.inc Wed Jun 19 08:25:31 2013
@@ -244,13 +244,6 @@ Path::isSymLink() const {
}
bool
-Path::canExecute() const {
- // FIXME: take security attributes into account.
- DWORD attr = GetFileAttributes(path.c_str());
- return attr != INVALID_FILE_ATTRIBUTES;
-}
-
-bool
Path::isRegularFile() const {
bool res;
if (fs::is_regular_file(path, res))
More information about the llvm-commits
mailing list