[LLVMdev] AsmPrinter behavior

Chris Lattner clattner at apple.com
Fri May 7 12:58:49 PDT 2010


On May 7, 2010, at 11:42 AM, Nathan Jeffords wrote:

>> $ llc t.ll -o - -mtriple=i386-apple-darwin10
>> 	.section	__TEXT,__text,regular,pure_instructions
>> .zerofill __DATA,__bss,_tst1,4,0        ## @tst1
>> 	.section	__DATA,__data
>> _tst2:                                  ## @tst2
>> 	.ascii	 "\000\001\002\003"
>> 
>> I think we should have an 'EmitZeroFill()' and 'EmitASCII()' OutStream methods, the latter to deal with dllexports in 'lib/Target/X86/AsmPrinter/AsmPrinter.cpp:569'.
>> 
>> We also need to sort out COFF TLOF, and get rid of the directive stuff.
> 
> It looks to me that you should have an Emit method for the .scl, .def, .type, .endef directives.  One callback each.
> 
> -Chris
> 
> I've had included a EmitCOFFSymbolDef in MCStreamer to replace the EmitRawText that was handling this, seem to me it would be easier to have a single call given the restrictions on their use.

Sure, whatever you guys think is best.  It is also very reasonable to add new enums to MCSymbolAttr if EmitSymbolAttribute is the right callback for these.

-Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100507/8d9511ce/attachment.html>


More information about the llvm-dev mailing list