Update for anyone else that comes across this: You have to register an ASM streamer, and overide the EditCommonSymbol method.<br><br><div class="gmail_quote">On Sat, Sep 8, 2012 at 9:07 AM, ryan baird <span dir="ltr"><<a href="mailto:ryanrbaird@gmail.com" target="_blank">ryanrbaird@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I'm working on building a target for llvm that's the intermediate language of another compiler, so that the other compiler can benifit from llvm's optimization passes. <br>
<br>I essentially made a copy of the mips backend, and then started changing the output to match the intermediate language of the compiler.  Most of the output can be overriden, but I haven't figured out how to change the way globals are emitted.  <br>

<br>The AsmPrinter::EmitGlobalVariable function in the llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp file is not virtual; if I try to override it, I get a "multiple definitions" error.  To emit the global, it just calls the OutputStreamer.EmitCommonSymbol method.  Again, this has become a problem because I don't want the default output for global symbols. If I can't override this method, how can I change the way that my target outputs globals variables?<br>

</blockquote></div><br>