summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/Windows/PathV2.inc
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2011-12-12 17:58:31 +0000
committerChad Rosier <mcrosier@apple.com>2011-12-12 17:58:31 +0000
commit531042840d376087b01475ec1a61d26329c471a7 (patch)
treebeaadfd8e3bf99ba8e81e20270b28e8503a22338 /llvm/lib/Support/Windows/PathV2.inc
parent735cb8bcdcb8dac5ea92ccf13bb16e9dc02caf62 (diff)
downloadbcm5719-llvm-531042840d376087b01475ec1a61d26329c471a7.tar.gz
bcm5719-llvm-531042840d376087b01475ec1a61d26329c471a7.zip
Revert r146363 to allow buildbots to make forward progress.
Original commit message: Support/FileSystem: Implement canonicalize. llvm-svn: 146378
Diffstat (limited to 'llvm/lib/Support/Windows/PathV2.inc')
-rw-r--r--llvm/lib/Support/Windows/PathV2.inc38
1 files changed, 0 insertions, 38 deletions
diff --git a/llvm/lib/Support/Windows/PathV2.inc b/llvm/lib/Support/Windows/PathV2.inc
index dd367e5baa8..7ca33c0bc96 100644
--- a/llvm/lib/Support/Windows/PathV2.inc
+++ b/llvm/lib/Support/Windows/PathV2.inc
@@ -614,44 +614,6 @@ retry_create_file:
return success;
}
-error_code canonicalize(const Twine &path, SmallVectorImpl<char> &result) {
- assert(path::is_absolute(path) && "path must be absolute!");
- SmallString<128> path_storage;
- StringRef p = path.toStringRef(path_storage);
- SmallVector<wchar_t, 128> path_utf16;
- result.set_size(0);
-
- // Convert path to UTF-16.
- if (error_code ec = UTF8ToUTF16(p, path_utf16))
- return ec;
-
- DWORD size = ::GetShortPathNameW(c_str(path_utf16), NULL, 0);
- SmallVector<wchar_t, 128> short_path;
- short_path.reserve(size + 1);
- size = ::GetShortPathNameW( c_str(path_utf16)
- , short_path.data()
- , short_path.capacity());
- if (!size)
- return windows_error(::GetLastError());
-
- short_path.set_size(size);
-
- size = ::GetLongPathNameW(c_str(short_path), NULL, 0);
- path_utf16.reserve(size + 1);
- size = ::GetLongPathNameW( c_str(short_path)
- , path_utf16.data()
- , path_utf16.capacity());
- if (!size)
- return windows_error(::GetLastError());
-
- path_utf16.set_size(size);
-
- if (error_code ec = UTF16ToUTF8(path_utf16.data(), path_utf16.size(), result))
- return ec;
-
- return success;
-}
-
error_code get_magic(const Twine &path, uint32_t len,
SmallVectorImpl<char> &result) {
SmallString<128> path_storage;
OpenPOWER on IntegriCloud