[llvm-commits] setAssembler method in MCOobjectStreamer
Jan Sjodin
jan_sjodin at yahoo.com
Thu Mar 3 13:31:33 PST 2011
----- Original Message ----
> From: Rafael Avila de Espindola <rafael.espindola at gmail.com>
> To: Jan Sjodin <jan_sjodin at yahoo.com>
> Cc: llvm-commits at cs.uiuc.edu
> Sent: Thu, March 3, 2011 4:11:23 PM
> Subject: Re: setAssembler method in MCOobjectStreamer
>
> 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.
>
The use is just initialization. I will change the code to use constructors
instead.
- Jan
More information about the llvm-commits
mailing list