diff options
author | Josh Stone <jistone@redhat.com> | 2010-02-19 17:44:44 -0800 |
---|---|---|
committer | Josh Stone <jistone@redhat.com> | 2010-02-23 16:20:35 -0800 |
commit | f946b10fbd72dd760f04ad9475f2ba3ccb56666f (patch) | |
tree | fccc6a4d31e04f741cf0a8ebe6f44c36943b9dae /elaborate.cxx | |
parent | d945a07eecee9851173365459d196bcd22c3e636 (diff) | |
download | systemtap-steved-f946b10fbd72dd760f04ad9475f2ba3ccb56666f.tar.gz systemtap-steved-f946b10fbd72dd760f04ad9475f2ba3ccb56666f.tar.xz systemtap-steved-f946b10fbd72dd760f04ad9475f2ba3ccb56666f.zip |
Simplify null_statement construction
It only needs a token*, so build that into the constructor.
Diffstat (limited to 'elaborate.cxx')
-rw-r--r-- | elaborate.cxx | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/elaborate.cxx b/elaborate.cxx index 88a856c2..b349ff8c 100644 --- a/elaborate.cxx +++ b/elaborate.cxx @@ -2449,8 +2449,7 @@ dead_stmtexpr_remover::visit_for_loop (for_loop *s) else { // Can't elide this whole statement; put a null in there. - s->block = new null_statement(); - s->block->tok = s->tok; + s->block = new null_statement(s->tok); } } provide (s); @@ -2526,8 +2525,7 @@ void semantic_pass_opt4 (systemtap_session& s, bool& relaxed_p) && ! s.timing) // PR10070 s.print_warning ("side-effect-free probe '" + p->name + "'", p->tok); - p->body = new null_statement(); - p->body->tok = p->tok; + p->body = new null_statement(p->tok); // XXX: possible duplicate warnings; see below } @@ -2551,8 +2549,7 @@ void semantic_pass_opt4 (systemtap_session& s, bool& relaxed_p) if (! s.suppress_warnings) s.print_warning ("side-effect-free function '" + fn->name + "'", fn->tok); - fn->body = new null_statement(); - fn->body->tok = fn->tok; + fn->body = new null_statement(fn->tok); // XXX: the next iteration of the outer optimization loop may // take this new null_statement away again, and thus give us a |