diff options
| author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-05-31 00:10:47 +0000 |
|---|---|---|
| committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-05-31 00:10:47 +0000 |
| commit | 98b5f08fd9aef296c540a0da2dd643303286d16f (patch) | |
| tree | a8e3d592d7027729d829e4cae1bf4ffb5d368231 /llvm/lib/Support/Unix | |
| parent | 8995833a34f0b29af3367e78ebcb565c2751c99c (diff) | |
| download | bcm5719-llvm-98b5f08fd9aef296c540a0da2dd643303286d16f.tar.gz bcm5719-llvm-98b5f08fd9aef296c540a0da2dd643303286d16f.zip | |
delete dead code.
llvm-svn: 209938
Diffstat (limited to 'llvm/lib/Support/Unix')
| -rw-r--r-- | llvm/lib/Support/Unix/Path.inc | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/llvm/lib/Support/Unix/Path.inc b/llvm/lib/Support/Unix/Path.inc index 519a016a84c..c36c865451e 100644 --- a/llvm/lib/Support/Unix/Path.inc +++ b/llvm/lib/Support/Unix/Path.inc @@ -653,35 +653,6 @@ error_code get_magic(const Twine &path, uint32_t len, return error_code::success(); } -error_code map_file_pages(const Twine &path, off_t file_offset, size_t size, - bool map_writable, void *&result) { - SmallString<128> path_storage; - StringRef name = path.toNullTerminatedStringRef(path_storage); - int oflags = map_writable ? O_RDWR : O_RDONLY; - int ofd = ::open(name.begin(), oflags); - if ( ofd == -1 ) - return error_code(errno, system_category()); - AutoFD fd(ofd); - int flags = map_writable ? MAP_SHARED : MAP_PRIVATE; - int prot = map_writable ? (PROT_READ|PROT_WRITE) : PROT_READ; -#ifdef MAP_FILE - flags |= MAP_FILE; -#endif - result = ::mmap(nullptr, size, prot, flags, fd, file_offset); - if (result == MAP_FAILED) { - return error_code(errno, system_category()); - } - - return error_code::success(); -} - -error_code unmap_file_pages(void *base, size_t size) { - if ( ::munmap(base, size) == -1 ) - return error_code(errno, system_category()); - - return error_code::success(); -} - error_code openFileForRead(const Twine &Name, int &ResultFD) { SmallString<128> Storage; StringRef P = Name.toNullTerminatedStringRef(Storage); |

