[PATCH][Mips] ELF header flag support for assemblers
Rafael EspĂndola
rafael.espindola at gmail.com
Mon Nov 18 14:39:33 PST 2013
>> What do you want the dyn_cast for? The design of the stream interface
>> is to avoid having to take different actions for object and assembly
>> streamers.
>
> I got hammered by not you, but the other MC folks before for not using dyn_cast when it was not going to be ever a choice. It was recommended to avoid static_cast. We are always guessing what will be acceptable.
>
> I am fine with static cast here. It should be all that is needed.
I see. There should never be the need to literally use dyn_cast/isa,
so static_cast should be sufficient. The isa infrastructure would be
handy if you want to use cast instead of static_cast to assert that
the cast is valid. In summary:
* cast is probably the best if you want to implement it.
* static_cast should probably be sufficient.
* please don't use isa/dyn_cast/hasRawText on the streamers or target
streamers.
Cheers,
Rafael
More information about the llvm-commits
mailing list