Stub out some sys::Path::MapInFilePages/UnMapFilePages methods.
authorChris Lattner <sabre@nondot.org>
Tue, 1 Apr 2008 06:00:12 +0000 (06:00 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 1 Apr 2008 06:00:12 +0000 (06:00 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49030 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/System/Path.h
lib/System/Unix/Path.inc
lib/System/Win32/Path.inc

index 303235db3ef27919e372570a3d568fba1f182456..1178d689819315e79a2e382830dc398def5cba8c 100644 (file)
@@ -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
     /// @{
index e11213294c63c36064958241bf860f0db2045fed..b0578dcdba40f774758cc9fefd7c2be8143acc64 100644 (file)
@@ -745,5 +745,15 @@ Path::makeUnique(bool reuse_current, std::string* ErrMsg) {
   return false;
 }
 
+/// MapInFilePages - Not yet implemented on win32.
+const char *Path::MapInFilePages(int FD, uint64_t FileSize) {
+  return 0;
+}
+
+/// MapInFilePages - Not yet implemented on win32.
+void Path::UnMapFilePages(const char *Base, uint64_t FileSize) {
+  assert(0 && "NOT IMPLEMENTED");
+}
+
 } // end llvm namespace
 
index b25e66140bfb4359d69943b9c0733ab461e98665..da29cd3596cefdc31ed090ffa49671054f96a6e1 100644 (file)
@@ -773,5 +773,15 @@ Path::createTemporaryFileOnDisk(bool reuse_current, std::string* ErrMsg) {
   return false;
 }
 
+/// MapInFilePages - Not yet implemented on win32.
+const char *Path::MapInFilePages(int FD, uint64_t FileSize) {
+  return 0;
+}
+
+/// MapInFilePages - Not yet implemented on win32.
+void Path::UnMapFilePages(const char *Base, uint64_t FileSize) {
+  assert(0 && "NOT IMPLEMENTED");
+}
+
 }
 }