mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 22:24:54 +00:00
Replace use of PathV1.h in Program.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183996 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -362,6 +362,17 @@ error_code exists(const Twine &path, bool &result) {
|
||||
return error_code::success();
|
||||
}
|
||||
|
||||
bool can_execute(const Twine &Path) {
|
||||
SmallString<128> PathStorage;
|
||||
SmallVector<wchar_t, 128> PathUtf16;
|
||||
|
||||
if (UTF8ToUTF16(Path.toStringRef(PathStorage), PathUtf16))
|
||||
return false;
|
||||
|
||||
DWORD Attr = ::GetFileAttributesW(PathUtf16.begin());
|
||||
return Attr != INVALID_FILE_ATTRIBUTES;
|
||||
}
|
||||
|
||||
bool equivalent(file_status A, file_status B) {
|
||||
assert(status_known(A) && status_known(B));
|
||||
return A.FileIndexHigh == B.FileIndexHigh &&
|
||||
|
Reference in New Issue
Block a user