summaryrefslogtreecommitdiffstats
path: root/llvm/lib/System/Unix
diff options
context:
space:
mode:
authorEdward O'Callaghan <eocallaghan@auroraux.org>2009-11-25 06:32:19 +0000
committerEdward O'Callaghan <eocallaghan@auroraux.org>2009-11-25 06:32:19 +0000
commit746782dde54faa42340ada7430b62a88ca95ced6 (patch)
tree945931d6f24e89b6dbd3dcc6c351cf5d59ed4508 /llvm/lib/System/Unix
parent3ff3af4ff9b4ad40d5f945cbc68ac4c56393f8c8 (diff)
downloadbcm5719-llvm-746782dde54faa42340ada7430b62a88ca95ced6.tar.gz
bcm5719-llvm-746782dde54faa42340ada7430b62a88ca95ced6.zip
API change Path::isSpecialFile to Path::isRegularFile, improve semantics in regards to comments from 89765 post review.
llvm-svn: 89848
Diffstat (limited to 'llvm/lib/System/Unix')
-rw-r--r--llvm/lib/System/Unix/Path.inc10
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/System/Unix/Path.inc b/llvm/lib/System/Unix/Path.inc
index 8dd76a74128..4300d6719b3 100644
--- a/llvm/lib/System/Unix/Path.inc
+++ b/llvm/lib/System/Unix/Path.inc
@@ -454,17 +454,17 @@ Path::canWrite() const {
}
bool
-Path::isSpecialFile() const {
+Path::isRegularFile() const {
// Get the status so we can determine if its a file or directory
struct stat buf;
if (0 != stat(path.c_str(), &buf))
- return true;
-
- if (S_ISDIR(buf.st_mode) || S_ISREG(buf.st_mode))
return false;
- return true;
+ if (S_ISREG(buf.st_mode))
+ return true;
+
+ return false;
}
bool
OpenPOWER on IntegriCloud