Transition to MC

I'm new to LLVM and I want to add support of emitting ELF to an existing port by transitioning it from using AsmPrinter to the MC streamer.

After perusing the existing documents, it seems to me that the information available about the MC streamer is not as rich as about other parts of the compiler. Is there any document, paper or presentation out there that provides more information about it?

As a reference, I'd like to find a patch that did the same to an existing architecture, but I couldn't find it in the commits mailing-list. Would someone have the link to such a patch handy?

Much obliged.

Hi Evandro,

There's no such documentation right now. It's on my TODO list, but unfortunately it's not very close to the top right now.

The ARM target migrated to using MC a while back and is probably a reasonable place to look for some guidance. It was done incrementally, not as one big patch, so there's not a specific revision to refer to. However, if you look at the revision history for the ARMAsmPrinter.cpp file and the ARM/InstPrinter directory, the progression should be reasonably clear.

-Jim