Hi Jim, Daniel, The last time the topic of subclassing MCELFStreamer came up, you both were helpful in identifying ways to handle the use case without requiring subclassing. Can you please take a look at the context below and let me know if you have any suggestions? For reference, this was posted to the list yesterday under the subject "sub-classing MCObjectStreamer?":> Okay, after more careful scrutiny of the code I see that MCObjectStreameris> intended to be very generic and it would actually be MCELFStreamer that Iwould> need to subclass. I see from a search through the dev list that this wasdiscussed> previously and discouraged, so I'll provide more context. > > We are working on integrated and stand-alone assemblers for a VLIW target > (Hexagon) and need to apply, among other things, instruction orderingrules on a> per-packet basis. We could handle this in the lowering phase, but thestandalone> assembly parser goes straight to MC and bypasses the lowering passaltogether.> This means we need to be able to work with packets in the streamer. > > We could easily address this by subclassing the streamer, but this seemsto be> discouraged as far as I can tell. Can we subclass MCELFStreamer to suitour> needs, or are there other ways to handle this case?Thanks, - -- Mario Guerra mariog at codeaurora.org Qualcomm Innovation Center Inc is a member of Code Aurora Forum, hosted by The Linux Foundation
Hi Mario, On Thu, Dec 6, 2012 at 4:08 PM, Mario Guerra <mariog at codeaurora.org> wrote:> The last time the topic of subclassing MCELFStreamer came up, you both were > helpful in identifying ways to handle the use case without requiring > subclassing. Can you please take a look at the context below and let me know > if you have any suggestions?Subclassing MCELFStreamer is probably also necessary to implement mapping symbols on ARM ELF targets (see the current thread at http://comments.gmane.org/gmane.comp.compilers.llvm.cvs/124737). Your refactoring patch on phabricator appears to be a functional subset of the one I've posted (though obviously not textually identical). As a smaller patch, it may be best to commit that first unless there are objections. Tim.
> Subclassing MCELFStreamer is probably also necessary to implement mapping > symbols on ARM ELF targets (see the current thread at > http://comments.gmane.org/gmane.comp.compilers.llvm.cvs/124737). > > Your refactoring patch on phabricator appears to be a functional subset ofthe one> I've posted (though obviously not textually identical). As a smallerpatch, it may be> best to commit that first unless there are objections.Thanks for your reply Tim. Reading through the thread, it would seem that subclassing MCELFStreamer is not exactly desirable, but doable when necessary. I'm going to follow this approach, unless anyone has any major objections? Thanks, Mario