I just had some code which filtered via isa<UnaryInstruction>. Strangely
enough not only the instructions which inherited UnaryInstructions but also:
GetElemPtrInst, SwitchInst , xor, shl
where true on isa<UnaryInstruction>. While the first two seem to be at least
semantically ok the latter seem somehow wrong?
I didn't find the place where the isa_impl templates where resolved to the
real thing, so i didn't dare to file a bug report... but i would happy if
somebody could tell me... and yes i have looked at Casting.h.
I just had some code which filtered via isa<UnaryInstruction>. Strangely
enough not only the instructions which inherited UnaryInstructions but also:
GetElemPtrInst, SwitchInst , xor, shl
where true on isa<UnaryInstruction>. While the first two seem to be at least
semantically ok the latter seem somehow wrong?
Yeah, that's really wrong.
I didn't find the place where the isa_impl templates where resolved to the
real thing, so i didn't dare to file a bug report... but i would happy if
somebody could tell me... and yes i have looked at Casting.h.
This is implemented with the 'classof' method on the class. Since it isn't implemented for UnaryInstruction, it is accepting anything that isa<Instruction>, which is very very wrong.
This is implemented with the 'classof' method on the class. Since it
isn't implemented for UnaryInstruction, it is accepting anything that
isa<Instruction>, which is very very wrong.
Well, probably i should have looked into the header files too...