diff options
author | Josh Stone <jistone@redhat.com> | 2009-02-10 18:29:55 -0800 |
---|---|---|
committer | Josh Stone <jistone@redhat.com> | 2009-02-10 18:29:55 -0800 |
commit | 1cd151d5b9e1fd46590d5e4c3473a86ea9bbe043 (patch) | |
tree | 1a9644eeed37df7d16c81a57dd7a8b5c4cf7ab6a /staptree.cxx | |
parent | 8bda649876b523f7733aa547ff86924a90f0e57b (diff) | |
download | systemtap-steved-1cd151d5b9e1fd46590d5e4c3473a86ea9bbe043.tar.gz systemtap-steved-1cd151d5b9e1fd46590d5e4c3473a86ea9bbe043.tar.xz systemtap-steved-1cd151d5b9e1fd46590d5e4c3473a86ea9bbe043.zip |
Simplify dead_stmtexpr_remover
* staptree.h (update_visitor::require): Add a clearok parameter for
optimizing traversers to signal that they're ready for NULL back.
* elaborate.cxx (dead_stmtexpr_remover): Convert to an update_visitor.
Diffstat (limited to 'staptree.cxx')
-rw-r--r-- | staptree.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/staptree.cxx b/staptree.cxx index 2b963bc3..9ffbaf09 100644 --- a/staptree.cxx +++ b/staptree.cxx @@ -2337,7 +2337,7 @@ update_visitor::visit_hist_op (hist_op* e) } template <> indexable* -update_visitor::require <indexable*> (indexable* src) +update_visitor::require <indexable*> (indexable* src, bool clearok) { indexable *dst = NULL; if (src != NULL) @@ -2351,7 +2351,7 @@ update_visitor::require <indexable*> (indexable* src) dst = require (array_src); else dst = require (hist_src); - assert (dst); + assert(clearok || dst); } return dst; } |