<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div><div></div><div><br class=""></div><div>Ferd</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><div class="">So LGTM on both counts.  Looking forward to the next patches to follow.</div></div></div></blockquote><div><br class=""></div><div>Thanks!</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><div class="">Cheers,</div><div class="">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; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br class=""><div class="gmail_quote">On 5 August 2015 at 08:24, Frédéric Riss<span class="Apple-converted-space"> </span><span dir="ltr" class=""><<a href="mailto:friss@apple.com" target="_blank" class="">friss@apple.com</a>></span><span class="Apple-converted-space"> </span>wrote:<br class=""><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 class=""><br class="">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 class=""><br class="">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 class=""><br class="">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 class=""><br class="">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 class=""><br class="">Both patches should have NFC.<br class=""><br class=""><br class=""><br class=""><br class=""><br class=""><br class=""><br class="">_______________________________________________<br class="">llvm-commits mailing list<br class=""><a href="mailto:llvm-commits@lists.llvm.org" class="">llvm-commits@lists.llvm.org</a><br class=""><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank" class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a></blockquote></div></div></div></blockquote></div><br class=""></body></html>