aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Support
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
commit7ae606a2a891707ad2e184b0e3baac0dce1b6c0f (patch)
treef2c89890209da3b8055b491e9a1733a7eec601bd /lib/Support
parenta0c17a495b12debcb7f206993bbc6020e2e6e8df (diff)
downloadexternal_llvm-7ae606a2a891707ad2e184b0e3baac0dce1b6c0f.zip
external_llvm-7ae606a2a891707ad2e184b0e3baac0dce1b6c0f.tar.gz
external_llvm-7ae606a2a891707ad2e184b0e3baac0dce1b6c0f.tar.bz2
Revert r146363 to allow buildbots to make forward progress.
Original commit message: Support/FileSystem: Implement canonicalize. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146378 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support')
-rw-r--r--lib/Support/Unix/PathV2.inc7
-rw-r--r--lib/Support/Windows/PathV2.inc38
-rw-r--r--lib/Support/Windows/Windows.h20
3 files changed, 0 insertions, 65 deletions
diff --git a/lib/Support/Unix/PathV2.inc b/lib/Support/Unix/PathV2.inc
index 2a21c14..272109d 100644
--- a/lib/Support/Unix/PathV2.inc
+++ b/lib/Support/Unix/PathV2.inc
@@ -431,13 +431,6 @@ rety_open_create:
return success;
}
-error_code canonicalize(const Twine &path, SmallVectorImpl<char> &result) {
- // Paths are already canonicalized on posix systems.
- assert(path::is_absolute(path) && "path must be absolute!");
- path.toVector(result);
- return success;
-}
-
error_code detail::directory_iterator_construct(detail::DirIterState &it,
StringRef path){
SmallString<128> path_null(path);
diff --git a/lib/Support/Windows/PathV2.inc b/lib/Support/Windows/PathV2.inc
index dd367e5..7ca33c0 100644
--- a/lib/Support/Windows/PathV2.inc
+++ b/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;
diff --git a/lib/Support/Windows/Windows.h b/lib/Support/Windows/Windows.h
index 2754075..5c1da0d 100644
--- a/lib/Support/Windows/Windows.h
+++ b/lib/Support/Windows/Windows.h
@@ -128,24 +128,6 @@ struct FindHandleTraits : CommonHandleTraits {
}
};
-struct FileMappingHandleTraits : CommonHandleTraits {
- static handle_type GetInvalid() {
- return 0;
- }
-};
-
-struct MappedViewOfFileHandleTraits : CommonHandleTraits {
- typedef LPVOID handle_type;
-
- static handle_type GetInvalid() {
- return 0;
- }
-
- static void Close(handle_type h) {
- ::UnmapViewOfFile(h);
- }
-};
-
struct FileHandleTraits : CommonHandleTraits {};
typedef ScopedHandle<CommonHandleTraits> ScopedCommonHandle;
@@ -153,8 +135,6 @@ typedef ScopedHandle<FileHandleTraits> ScopedFileHandle;
typedef ScopedHandle<CryptContextTraits> ScopedCryptContext;
typedef ScopedHandle<FindHandleTraits> ScopedFindHandle;
typedef ScopedHandle<JobHandleTraits> ScopedJobHandle;
-typedef ScopedHandle<FileMappingHandleTraits> ScopedFileMappingHandle;
-typedef ScopedHandle<MappedViewOfFileHandleTraits> ScopedMappedViewOfFileHandle;
namespace llvm {
template <class T>