<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>Hi Alp,</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">
> No, getBuffer() really does return a StringRef. Like I said, the function just happens to have a silly name.<br>
<br>
</div>MemoryBuffer::getBuffer() *does* return a StringRef, but at two of the three readMachOMagic callsites in this code 'Buffer' isn't a MemoryBuffer. It's an ObjectBuffer, and ObjectBuffer::getBuffer() returns a MemoryBuffer. Obviously, right? ;)</blockquote>
<div><br></div><div>Scratch that - I had confused ObjectBuffer::getBuffer and ObjectBuffer::getMemBuffer. I can't imagine how. ;)</div><div><br></div><div>You're right - this can be rewritten with a StringRef. I'll make sure I roll that into my cleanup.</div>
<div><br></div><div>- Lang.</div></div></div></div>