[llvm-commits] setAssembler method in MCOobjectStreamer

Jan Sjodin jan_sjodin at yahoo.com
Tue Mar 8 08:44:21 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.
> 
> > - Jan
> 
> Cheers,
> Rafael

Here is the updated patch. OK to commit?

- Jan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0045_streamerinit.patch
Type: application/octet-stream
Size: 1866 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110308/10033105/attachment.obj>


More information about the llvm-commits mailing list