[PATCH] [Support] Add MemoryBuffer::getFileSlice()

Nick Kledzik kledzik at apple.com
Thu Sep 25 10:48:36 PDT 2014


ping

On Sep 19, 2014, at 6:35 PM, kledzik at apple.com wrote:
> Hi rafael,
> 
> mach-o supports "fat" files which are a header/table-of-contents followed by a concatenation of mach-o files of different architectures.   Currently, MemoryBuffer has no easy way to map a subrange (slice) of a file which lld will need to select a mach-o slice of a fat file.  The new function provides an easy way to map a slice of a file into a MemoryBuffer.  Test case included.
> 
> http://reviews.llvm.org/D5423
> 
> Files:
>  include/llvm/Support/MemoryBuffer.h
>  lib/Support/MemoryBuffer.cpp
>  unittests/Support/MemoryBufferTest.cpp
> <D5423.13901.patch>




More information about the llvm-commits mailing list