Mesa (master): i965/cfg: Assert that cur_do/while/ if pointers are non-NULL.

Matt Turner mattst88 at kemper.freedesktop.org
Wed Jul 29 16:17:27 UTC 2015


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

Author: Matt Turner <mattst88 at gmail.com>
Date:   Fri Jul 10 19:49:49 2015 -0700

i965/cfg: Assert that cur_do/while/if pointers are non-NULL.

More.. like in commit 4d93a07c.

---

 src/mesa/drivers/dri/i965/brw_cfg.cpp |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/brw_cfg.cpp b/src/mesa/drivers/dri/i965/brw_cfg.cpp
index f1f230e..91d53ef 100644
--- a/src/mesa/drivers/dri/i965/brw_cfg.cpp
+++ b/src/mesa/drivers/dri/i965/brw_cfg.cpp
@@ -208,6 +208,7 @@ cfg_t::cfg_t(exec_list *instructions)
          cur_else = cur;
 
 	 next = new_block();
+         assert(cur_if != NULL);
 	 cur_if->add_successor(mem_ctx, next);
 
 	 set_next_block(&cur, next, ip);
@@ -274,6 +275,7 @@ cfg_t::cfg_t(exec_list *instructions)
          inst->exec_node::remove();
          cur->instructions.push_tail(inst);
 
+         assert(cur_do != NULL);
 	 cur->add_successor(mem_ctx, cur_do);
 
 	 next = new_block();
@@ -287,6 +289,7 @@ cfg_t::cfg_t(exec_list *instructions)
          inst->exec_node::remove();
          cur->instructions.push_tail(inst);
 
+         assert(cur_while != NULL);
 	 cur->add_successor(mem_ctx, cur_while);
 
 	 next = new_block();




More information about the mesa-commit mailing list