[LLVMdev] Non-standard labels

Yuri Gribov tetra2005 at googlemail.com
Sat Sep 18 08:14:46 PDT 2010


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?

-Yuri Gribov



More information about the llvm-dev mailing list