diff options
| author | Michael J. Spencer <bigcheesegs@gmail.com> | 2010-11-10 15:05:39 +0000 |
|---|---|---|
| committer | Michael J. Spencer <bigcheesegs@gmail.com> | 2010-11-10 15:05:39 +0000 |
| commit | 909d238eba3003efda367751e81cab5814e1bb12 (patch) | |
| tree | 1e100ee8d831c3edd10b560b48aa019317890c8c /llvm/lib/System | |
| parent | b0579e9d3f1a778b57d5ef8e6eec36e63a596149 (diff) | |
| download | bcm5719-llvm-909d238eba3003efda367751e81cab5814e1bb12.tar.gz bcm5719-llvm-909d238eba3003efda367751e81cab5814e1bb12.zip | |
System/Win32/Path: Implement isSymLink.
llvm-svn: 118681
Diffstat (limited to 'llvm/lib/System')
| -rw-r--r-- | llvm/lib/System/Win32/Path.inc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/llvm/lib/System/Win32/Path.inc b/llvm/lib/System/Win32/Path.inc index 4760dfd93d6..66e50acaea3 100644 --- a/llvm/lib/System/Win32/Path.inc +++ b/llvm/lib/System/Win32/Path.inc @@ -376,7 +376,15 @@ Path::isDirectory() const { bool Path::isSymLink() const { - return false; + DWORD attributes = GetFileAttributes(path.c_str()); + + if (attributes == INVALID_FILE_ATTRIBUTES) + // There's no sane way to report this :(. + assert(0 && "GetFileAttributes returned INVALID_FILE_ATTRIBUTES"); + + // This isn't exactly what defines a NTFS symlink, but it is only true for + // paths that act like a symlink. + return attributes & FILE_ATTRIBUTE_REPARSE_POINT; } bool |

