aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/System/Path.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-04-01 06:00:12 +0000
committerChris Lattner <sabre@nondot.org>2008-04-01 06:00:12 +0000
commit799ed1053b6a4cb2e3a6d588bd24025daee7ad1f (patch)
tree4ef5d0f12b24a423ba7601f032f9eb730748abcc /include/llvm/System/Path.h
parent7f6b4479044e7f6553f517737caa18e4e543697c (diff)
downloadexternal_llvm-799ed1053b6a4cb2e3a6d588bd24025daee7ad1f.zip
external_llvm-799ed1053b6a4cb2e3a6d588bd24025daee7ad1f.tar.gz
external_llvm-799ed1053b6a4cb2e3a6d588bd24025daee7ad1f.tar.bz2
Stub out some sys::Path::MapInFilePages/UnMapFilePages methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49030 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/System/Path.h')
-rw-r--r--include/llvm/System/Path.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/include/llvm/System/Path.h b/include/llvm/System/Path.h
index 303235d..1178d68 100644
--- a/include/llvm/System/Path.h
+++ b/include/llvm/System/Path.h
@@ -544,6 +544,29 @@ namespace sys {
/// @brief Removes the file or directory from the filesystem.
bool eraseFromDisk(bool destroy_contents = false,
std::string *Err = 0) const;
+
+
+ /// MapInFilePages - This is a low level system API to map in the file
+ /// that is currently opened as FD into the current processes' address
+ /// space for read only access. This function may return null on failure
+ /// or if the system cannot provide the following constraints:
+ /// 1) The pages must be valid after the FD is closed, until
+ /// UnMapFilePages is called.
+ /// 2) Any padding after the end of the file must be zero filled, if
+ /// present.
+ /// 3) The pages must be contiguous.
+ ///
+ /// This API is not intended for general use, clients should use
+ /// MemoryBuffer::getFile instead.
+ static const char *MapInFilePages(int FD, uint64_t FileSize);
+
+ /// UnMapFilePages - Free pages mapped into the current process by
+ /// MapInFilePages.
+ ///
+ /// This API is not intended for general use, clients should use
+ /// MemoryBuffer::getFile instead.
+ static void UnMapFilePages(const char *Base, uint64_t FileSize);
+
/// @}
/// @name Data
/// @{