On Tue, Jul 29, 2014 at 4:10 PM, Prathamesh Kulkarni <bilbotheelffri...@gmail.com> wrote: > On Mon, Jul 28, 2014 at 7:30 PM, David Malcolm <dmalc...@redhat.com> wrote: >> On Mon, 2014-07-28 at 02:35 +0530, Prathamesh Kulkarni wrote: >>> - if (o->type == operand::OP_CAPTURE) >>> + if (is_a<capture *> (o)) >>> { >>> - capture *c = static_cast<capture *> (o); >>> - fprintf (f, "@%s", (static_cast<capture *> (o))->where); >>> + capture *c = as_a<capture *> (o); >> >> FWIW, if you're doing an is_a<T> followed by a new declaration with an >> as_a<T>, that can be done in one line with is-a.h as: >> >> if (capture *c = dyn_cast <capture *> (o)) >> >> >> > Thanks, fixed in this patch. > > * genmatch.c (print_operand): Adjust to use dyn_cast.
Committed. Richard. > Regards, > Prathamesh