<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Sep 3, 2014 at 6:09 PM, Brad Smith <span dir="ltr"><<a href="mailto:brad@comstyle.com" target="_blank">brad@comstyle.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On 02/09/14 3:18 AM, Joerg Sonnenberger wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Mon, Sep 01, 2014 at 10:07:46PM -0700, Owen Anderson wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Why are you using MachO on a SPARC target?<br>
</blockquote>
<br>
See mail from me a bit ago -- because MC uses that function to ensure<br>
that an empty function gets at least one instruction.<br>
</blockquote>
<br></div>
Which was to try to deal with the issue of the assembler crashing..<br>
<br>
EmitRawText called on an MCStreamer that doesn't support it,  something must not be fully mc'ized<br>
<br>
from lib/CodeGen/AsmPrinter/<u></u>AsmPrinter.cpp..<br>
<br>
  // If the function is empty and the object file uses .subsections_via_symbols,<br>
  // then we need to emit *something* to the function body to prevent the<br>
  // labels from collapsing together.  Just emit a noop.<br>
  if ((MAI-><u></u>hasSubsectionsViaSymbols() && !HasAnyRealCode) || RequiresNoop) {<br>
    MCInst Noop;<br>
    TM.getSubtargetImpl()-><u></u>getInstrInfo()-><u></u>getNoopForMachoTarget(Noop);<br>
    if (Noop.getOpcode()) {<br>
      OutStreamer.AddComment("avoids zero-length function");<br>
      OutStreamer.EmitInstruction(<u></u>Noop, getSubtargetInfo());<br>
    } else  // Target not mc-ized yet.<br>
      OutStreamer.EmitRawText(<u></u>StringRef("\tnop\n"));<div class="im HOEnZb"><br>
  }<br></div></blockquote><div><br></div><div>... that's terrible.</div><div><br></div><div>Also it probably shouldn't be returning subsections via symbols as well.</div><div><br></div><div>Anyhow, let's solve the original problem better :)</div>
<div><br></div><div>-eric </div></div></div></div>