diff --git a/src/script_opt/ProfileFunc.cc b/src/script_opt/ProfileFunc.cc index b29bf068d4..096604df3f 100644 --- a/src/script_opt/ProfileFunc.cc +++ b/src/script_opt/ProfileFunc.cc @@ -130,15 +130,6 @@ TraversalCode ProfileFunc::PreStmt(const Stmt* s) case STMT_WHEN: ++num_when_stmts; - - in_when = true; - s->AsWhenStmt()->Cond()->Traverse(this); - in_when = false; - - // It doesn't do any harm for us to re-traverse the - // conditional, so we don't bother hand-traversing the - // rest of the "when", but just let the usual processing - // do it. break; case STMT_FOR: @@ -320,9 +311,6 @@ TraversalCode ProfileFunc::PreExpr(const Expr* e) { auto bf = static_cast(func_vf); script_calls.insert(bf); - - if ( in_when ) - when_calls.insert(bf); } else BiF_globals.insert(func); diff --git a/src/script_opt/ProfileFunc.h b/src/script_opt/ProfileFunc.h index 36de4ee5ca..1b0a08e54c 100644 --- a/src/script_opt/ProfileFunc.h +++ b/src/script_opt/ProfileFunc.h @@ -260,10 +260,6 @@ protected: // Whether we should treat record field accesses as absolute // (integer offset) or relative (name-based). bool abs_rec_fields; - - // Whether we're separately processing a "when" condition to - // mine out its script calls. - bool in_when = false; }; // Function pointer for a predicate that determines whether a given