nv50/ir: wrap assertion using typeid in #ifndef NDEBUG

Note: this is a candidate for the 9.0 stable branch.
This commit is contained in:
Christoph Bumiller 2013-01-07 15:50:19 +01:00
parent 076f4ced8b
commit be75a9373a

View file

@ -715,7 +715,9 @@ Instruction::clone(ClonePolicy<Function>& pol, Instruction *i) const
{
if (!i)
i = new_Instruction(pol.context(), op, dType);
#ifndef NDEBUG // non-conformant assert, so this is required
assert(typeid(*i) == typeid(*this));
#endif
pol.set<Instruction>(this, i);