[llvm-commits] [PATCH] Add mapped_file_region for read/write mapped files.

Sean Silva silvas at purdue.edu
Mon Aug 6 14:34:20 PDT 2012


+/// LLVM_EQ_DELETE - Document that a member function should not be callable.
+/// This uses = delete where supported. The function should still be private to
+/// partially work in C++03.
+#if (__has_feature(cxx_deleted_functions)   \
+     || defined(__GXX_EXPERIMENTAL_CXX0X__))
+#define LLVM_EQ_DELETE = delete
+#else
+#define LLVM_EQ_DELETE
+#endif

You seem to be slipping this in rather subtly. I think it would be
good to have this be its own patch, so that it can get some
discussion. Is the intent that this should be used in place of the
classic "// DO NOT IMPLEMENT" comment? If so, I think that awareness
of this should be made more widespread (entry in the Coding Standards,
maybe?).

--Sean Silva

On Mon, Aug 6, 2012 at 2:00 PM, Michael Spencer <bigcheesegs at gmail.com> wrote:
> The attached patch adds mapped_file_region based on
> boost::iostreams::mapped_file. This is a replacement for
> map_file_pages/unmap_file_pages to work properly on Windows. This can
> also be used by MemoryBuffer to finally have memory mapped files on
> Windows.
>
> The reason the previous APIs do not work for Windows is that there are
> 3 different handles that need to be kept track of to properly unmap a
> region. For munmap there is only 1.
>
> - Michael Spencer
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>



More information about the llvm-commits mailing list