[llvm-commits] setAssembler method in MCOobjectStreamer

Rafael Avila de Espindola rafael.espindola at gmail.com
Thu Mar 3 13:11:23 PST 2011


On 11-03-03 03:52 PM, Jan Sjodin wrote:
> This patch adds a function to set the assembler in the MCObjectStreamer, we may
> not want to use the default Writer, which means the Assembler has to be removed
> or modified.
> There are two alternatives to this patch:
>
> 1. Create another constructor (both for MCObjectStreamer and MCELFStreamer)
> which takes the Writer as an argument.
> 2. Add a method to the MCAssembler to replace the Writer.
>
> If one of the alternatives is preferred to this patch, I can do it that way
> instead.

It is hard to be sure without seeing the use, but option 1 looks better. 
A setter could in general be called at any point and changing the 
assembler at an arbitrary point looks strange.

> - Jan

Cheers,
Rafael



More information about the llvm-commits mailing list