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

Chandler Carruth chandlerc at google.com
Thu Jan 31 18:43:50 PST 2013


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?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130131/5c992808/attachment.html>


More information about the llvm-commits mailing list