On Tue, Jul 29, 2014 at 4:10 PM, Prathamesh Kulkarni
wrote:
> On Mon, Jul 28, 2014 at 7:30 PM, David Malcolm wrote:
>> On Mon, 2014-07-28 at 02:35 +0530, Prathamesh Kulkarni wrote:
>>> - if (o->type == operand::OP_CAPTURE)
>>> + if (is_a (o))
>>> {
>>> - capture *c = static_cast (o);
On Mon, Jul 28, 2014 at 7:30 PM, David Malcolm wrote:
> On Mon, 2014-07-28 at 02:35 +0530, Prathamesh Kulkarni wrote:
>> - if (o->type == operand::OP_CAPTURE)
>> + if (is_a (o))
>> {
>> - capture *c = static_cast (o);
>> - fprintf (f, "@%s", (static_cast (o))->where);
>> + ca
On Mon, 2014-07-28 at 02:35 +0530, Prathamesh Kulkarni wrote:
> - if (o->type == operand::OP_CAPTURE)
> + if (is_a (o))
> {
> - capture *c = static_cast (o);
> - fprintf (f, "@%s", (static_cast (o))->where);
> + capture *c = as_a (o);
FWIW, if you're doing an is_a followed b
On Sun, Jul 27, 2014 at 11:05 PM, Prathamesh Kulkarni
wrote:
> Is it okay to include is-a.h ?
> I have adjusted print_operand to use is_a<> and as_a<> in this patch.
>
> * genmatch.c (is-a.h): Include.
> (is_a_helper::test): Specialize for operand subclasses.
> (print_operand): Adjust to u