<div dir="ltr">I didn't refer to mmaping in the name because LLVM's MemoryBuffer is not necessarily mmap'ed.  It might be mmap'ed and it might not be.  Depends on various factors such as whether you specify the IsVolatile flag, how big the file is, and maybe a few other things.<div><br></div><div>After this change we have DataBufferLLVM and DataBufferHeap.  But it turns out an LLVM MemoryBuffer can also be backed by the heap, which now makes DataBufferHeap redundant as well.  So I think longer term we might be able to get rid of all of LLDB's DataBuffer stuff entirely, and everything will just use llvm::MemoryBuffer directly.</div><div><br></div><div>What do you think?</div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Feb 27, 2017 at 10:36 AM Jim Ingham <<a href="mailto:jingham@apple.com">jingham@apple.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This is kind of after the fact, but why didn't we reuse DataBufferMemoryMap for the Memory Map data buffer that now happens to be backed by an LLVM implementation?  DataBufferLLVM doesn't really tell anybody what the thing does w/o looking up the implementation.<br class="gmail_msg">
<br class="gmail_msg">
Jim<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
> On Feb 27, 2017, at 2:56 AM, Pavel Labath via lldb-commits <<a href="mailto:lldb-commits@lists.llvm.org" class="gmail_msg" target="_blank">lldb-commits@lists.llvm.org</a>> wrote:<br class="gmail_msg">
><br class="gmail_msg">
> I was thinking of a simple test like "call get on an existing file and<br class="gmail_msg">
> make sure it returns something reasonable" and "call get on a<br class="gmail_msg">
> non-existing file and make sure it returns null". This is a very thin<br class="gmail_msg">
> wrapper over over the llvm code, so I don't insist on it though...<br class="gmail_msg">
><br class="gmail_msg">
> On 24 February 2017 at 15:18, Zachary Turner <<a href="mailto:zturner@google.com" class="gmail_msg" target="_blank">zturner@google.com</a>> wrote:<br class="gmail_msg">
>> I left out unit tests since we'd essentially be duplicating the unit tests<br class="gmail_msg">
>> of MemoryBuffer, and because it involves the file system (also this is<br class="gmail_msg">
>> temporary code until DataBuffer stuff goes away). Lmk if you disagree though<br class="gmail_msg">
>> On Fri, Feb 24, 2017 at 2:53 AM Pavel Labath via Phabricator<br class="gmail_msg">
>> <<a href="mailto:reviews@reviews.llvm.org" class="gmail_msg" target="_blank">reviews@reviews.llvm.org</a>> wrote:<br class="gmail_msg">
>>><br class="gmail_msg">
>>> labath added a comment.<br class="gmail_msg">
>>><br class="gmail_msg">
>>> I am not sure if this is a voting situation, but I agree with what Zachary<br class="gmail_msg">
>>> said above.<br class="gmail_msg">
>>><br class="gmail_msg">
>>> Since we're already speaking about tests, it looks like the new<br class="gmail_msg">
>>> DataBufferLLVM class could use a unit test or two, just so we get in the<br class="gmail_msg">
>>> habit of writing those.<br class="gmail_msg">
>>><br class="gmail_msg">
>>><br class="gmail_msg">
>>> <a href="https://reviews.llvm.org/D30054" rel="noreferrer" class="gmail_msg" target="_blank">https://reviews.llvm.org/D30054</a><br class="gmail_msg">
>>><br class="gmail_msg">
>>><br class="gmail_msg">
>>><br class="gmail_msg">
>><br class="gmail_msg">
> _______________________________________________<br class="gmail_msg">
> lldb-commits mailing list<br class="gmail_msg">
> <a href="mailto:lldb-commits@lists.llvm.org" class="gmail_msg" target="_blank">lldb-commits@lists.llvm.org</a><br class="gmail_msg">
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits" rel="noreferrer" class="gmail_msg" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits</a><br class="gmail_msg">
<br class="gmail_msg">
</blockquote></div>