Mesa (master): nv50/ir: wrap assertion using typeid in #ifndef NDEBUG

Christoph Bumiller chrisbmr at kemper.freedesktop.org
Tue Jan 8 15:14:36 UTC 2013


Module: Mesa
Branch: master
Commit: be75a9373a6d0f9e2ef35ac376a541e60d72d306
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=be75a9373a6d0f9e2ef35ac376a541e60d72d306

Author: Christoph Bumiller <e0425955 at student.tuwien.ac.at>
Date:   Mon Jan  7 15:50:19 2013 +0100

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

Note: this is a candidate for the 9.0 stable branch.

---

 src/gallium/drivers/nv50/codegen/nv50_ir.cpp |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/gallium/drivers/nv50/codegen/nv50_ir.cpp b/src/gallium/drivers/nv50/codegen/nv50_ir.cpp
index 335e9e0..146dbbb 100644
--- a/src/gallium/drivers/nv50/codegen/nv50_ir.cpp
+++ b/src/gallium/drivers/nv50/codegen/nv50_ir.cpp
@@ -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);
 




More information about the mesa-commit mailing list