[PATCH][llvm-c] Create Memory Buffer with memory ranges

Chris Lattner clattner at apple.com
Wed Feb 13 10:55:17 PST 2013


On Feb 13, 2013, at 3:59 AM, Moritz Maxeiner <moritzmaxeiner at googlemail.com> wrote:

> On 2/13/2013 5:46 AM, Chris Lattner wrote: 
>> On Feb 10, 2013, at 9:13 AM, Moritz Maxeiner <moritzmaxeiner at googlemail.com> wrote: 
>> 
>>> Add two new functions to the C API: 
>>> 
>>> LLVMCreateMemoryBufferWithMemoryRange - exposes MemoryBuffer::getMemBuffer 
>>> LLVMCreateMemoryBufferWithMemoryRangeCopy - exposes MemoryBuffer::getMemBufferCopy 
>> These new APIs should take a "const char*" + length.  The memory buffer may have embedded nul's in it. 
> 
> Of course, my bad. I assume the BufferName may not contain nuls, so I added the lengths only for the 
> InputData, if that is not the case - i.e. the BufferName may contain nuls - I'll change that as well. 

LGTM!

-Chris

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130213/b399e246/attachment.html>


More information about the llvm-commits mailing list