<div dir="ltr">Hey Fred<div><br></div><div>Sorry this took so long, especially for a cleanup.  LGTM.</div><div><br></div><div>Cheers,</div><div>Pete</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 7 August 2015 at 12:50, Frédéric Riss <span dir="ltr"><<a href="mailto:friss@apple.com" target="_blank">friss@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><span class=""><blockquote type="cite"><div>On Aug 7, 2015, at 12:12 PM, Pete Cooper <<a href="mailto:pete.cooper@gmail.com" target="_blank">pete.cooper@gmail.com</a>> wrote:</div><br><div><div dir="ltr" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">Hey Fred<div><br></div><div>The first patch is fine.  I've been investigating whether individual emitters for formats can have more control over the layout.  This patch is actually similar to what I was doing (for those interested, I was trying to see if laying out a function at a time on MachO would be a good idea as then the relocations in the function can be resolved immediately without creating fixups).</div><div><br></div><div>The second patch appears to just be formatting.  I don't see the 'tad more generic' you mention.  The patch is itself good cleanup if you are going to be making more changes to the code anyway.</div></div></div></blockquote><div><br></div></span><div>Doh, looks like I sent out the result of git-format-patch rather than the actual patch… Here it is again (I hope)</div><div><br></div><div></div></div></div><br><div style="word-wrap:break-word"><div><div></div><div><br></div><div>Ferd</div><br><blockquote type="cite"><div><div dir="ltr" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div>So LGTM on both counts.  Looking forward to the next patches to follow.</div></div></div></blockquote><div><br></div><div>Thanks!</div><br><blockquote type="cite"><div><div dir="ltr" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div>Cheers,</div><div>Pete</div></div><div class="gmail_extra" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br><div class="gmail_quote">On 5 August 2015 at 08:24, Frédéric Riss<span> </span><span dir="ltr"><<a href="mailto:friss@apple.com" target="_blank">friss@apple.com</a>></span><span> </span>wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi,<br><br>I’m directly and indirectly using the MC layer to produce the content of the debug sections in llvm-dsymutil. This works great, except that dsymutil is supposed to produce dSYM companion binaries and not the simple object files MC was designed to produce.<br><br>At some point I contemplated making MC generic enough to emit these kind of binaries, but it just feels like a bad fit. Moreover dSYM companion binaries have a number of unique characteristics that I think would fit pretty badly into any kind of generic framework (eg. fake sections that have a size but no contents or VM layout without any loadable sections).<br><br>I went the route of writing my own equivalent of the MCObjectWriter in llvm-dsymutil which was easy enough. Today the layout of the sections and the file emission is done inside MCAssembler::Finish(). For my usecase, I want to run only the section layout and do the emission myself. The first attached patch allows that by splitting a layout(MCAsmLayout &) method out of MCAssembler::Finish(). Does this look reasonable?<br><br>I also tried to reuse some low-level MachObjectWriter primitives. The second patch attached allows me to do just that by making them a tad more generic.<br><br>Both patches should have NFC.<br><br><br><br><br><br><br><br>_______________________________________________<br>llvm-commits mailing list<br><a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a></blockquote></div></div></div></blockquote></div><br></div><br></blockquote></div><br></div>