[LLVMdev] Non-standard labels

Chris Lattner clattner at apple.com
Sat Sep 18 09:47:43 PDT 2010


On Sep 18, 2010, at 8:14 AM, Yuri Gribov wrote:

> Hi all,
> 
> I am emitting code for assembler which wants non-standard text for
> labels (not just "LABEL:"). One way would be to override all methods
> of AsmPrinter which call MCStreamer::EmitLabel but this is too
> painful. I can think of two solutions:
> 
> 1) add AsmPrinter::EmitLabel which calls Streamer by default but may
> be overriden in target AsmPrinters
> 2) Register my own instance of MCStreamer which delegates all calls
> (except EmitLabel) to MCAsmStreamer. For this I will probably need to
> add RegisterAsmStreamer in TargetRegistry.h...
> 
> Which one is the best? Or maybe I have overlooked some easier solution?

Hi Yuri,

I don't really understand what you're trying to do, can you give an example?

-Chris



More information about the llvm-dev mailing list