diff options
Diffstat (limited to 'tapset-procfs.cxx')
-rw-r--r-- | tapset-procfs.cxx | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/tapset-procfs.cxx b/tapset-procfs.cxx index a996ee32..527b4486 100644 --- a/tapset-procfs.cxx +++ b/tapset-procfs.cxx @@ -94,7 +94,7 @@ procfs_derived_probe::procfs_derived_probe (systemtap_session &s, probe* p, { // Expand local variables in the probe body procfs_var_expanding_visitor v (s, name, path, write); - this->body = v.require (this->body); + v.replace (this->body); target_symbol_seen = v.target_symbol_seen; } @@ -358,24 +358,7 @@ procfs_var_expanding_visitor::visit_target_symbol (target_symbol* e) throw semantic_error ("invalid target symbol for procfs probe, $value expected", e->tok); - if (e->components.size() > 0) - { - switch (e->components[0].first) - { - case target_symbol::comp_literal_array_index: - throw semantic_error("procfs target variable '$value' may not be used as array", - e->tok); - break; - case target_symbol::comp_struct_member: - throw semantic_error("procfs target variable '$value' may not be used as a structure", - e->tok); - break; - default: - throw semantic_error ("invalid use of procfs target variable '$value'", - e->tok); - break; - } - } + e->assert_no_components("procfs"); bool lvalue = is_active_lvalue(e); if (write_probe && lvalue) |