[llvm] r174113 - Give the MCStreamer class hierarchy LLVM RTTI facilities for use with

Jim Grosbach grosbach at apple.com
Thu Jan 31 23:51:37 PST 2013


On Jan 31, 2013, at 6:43 PM, Chandler Carruth <chandlerc at google.com> wrote:

> On Thu, Jan 31, 2013 at 6:33 PM, Carter, Jack <jcarter at mips.com> wrote:
>> Jim,
>> 
>> I'm retrofitting my Mips portion of the e_header patch to fit what was done for ARM. A few questions:
>> 
>> Why is ARM here in MCELFStreamer.h? Is this just an early fix?
>> 
>> > +  static bool classof(const MCStreamer *S) {
>> > +    return S->getKind() == SK_ELFStreamer && S->getKind() == SK_ARMELFStreamer;
>> > +  }
>> 
>> And I assume that I will want to add an SK_MipsELFStreamer enum variant to MCStreamer.h.
> 
> See: http://llvm.org/docs/HowToSetUpLLVMStyleRTTI.html
> 
> Actually, I think we might want to move all of the middle class checks to be based on a covered switch so we get compiler warnings to ensure everywhere gets updated.
> 
> Thoughts Jim?

Compile time diagnostics instead of runtime issues sounds like a win to me.

Jim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130131/07868b51/attachment.html>


More information about the llvm-commits mailing list