From 5d9d24daef53c7b9646da355297deda6753565a8 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Thu, 13 Feb 2014 13:45:45 +0000 Subject: Remove dead code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201327 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Support/Windows/Path.inc | 32 -------------------------------- 1 file changed, 32 deletions(-) (limited to 'lib/Support/Windows') diff --git a/lib/Support/Windows/Path.inc b/lib/Support/Windows/Path.inc index 46e9ce7acb..4c51c4401f 100644 --- a/lib/Support/Windows/Path.inc +++ b/lib/Support/Windows/Path.inc @@ -45,15 +45,6 @@ using llvm::sys::windows::UTF8ToUTF16; using llvm::sys::windows::UTF16ToUTF8; namespace { - typedef BOOLEAN (WINAPI *PtrCreateSymbolicLinkW)( - /*__in*/ LPCWSTR lpSymlinkFileName, - /*__in*/ LPCWSTR lpTargetFileName, - /*__in*/ DWORD dwFlags); - - PtrCreateSymbolicLinkW create_symbolic_link_api = - PtrCreateSymbolicLinkW(::GetProcAddress( - ::GetModuleHandleW(L"Kernel32.dll"), "CreateSymbolicLinkW")); - error_code TempDir(SmallVectorImpl &result) { retry_temp_dir: DWORD len = ::GetTempPathW(result.capacity(), result.begin()); @@ -312,29 +303,6 @@ error_code create_hard_link(const Twine &to, const Twine &from) { return error_code::success(); } -error_code create_symlink(const Twine &to, const Twine &from) { - // Only do it if the function is available at runtime. - if (!create_symbolic_link_api) - return make_error_code(errc::function_not_supported); - - // Get arguments. - SmallString<128> from_storage; - SmallString<128> to_storage; - StringRef f = from.toStringRef(from_storage); - StringRef t = to.toStringRef(to_storage); - - // Convert to utf-16. - SmallVector wide_from; - SmallVector wide_to; - if (error_code ec = UTF8ToUTF16(f, wide_from)) return ec; - if (error_code ec = UTF8ToUTF16(t, wide_to)) return ec; - - if (!create_symbolic_link_api(wide_from.begin(), wide_to.begin(), 0)) - return windows_error(::GetLastError()); - - return error_code::success(); -} - error_code remove(const Twine &path, bool &existed) { SmallString<128> path_storage; SmallVector path_utf16; -- cgit v1.2.3