summaryrefslogtreecommitdiffstats
path: root/tapsets.cxx
diff options
context:
space:
mode:
authorJosh Stone <jistone@redhat.com>2010-02-25 16:20:50 -0800
committerJosh Stone <jistone@redhat.com>2010-02-25 16:20:50 -0800
commitb7aedf26f105793793c66c39c85abe76e1510e66 (patch)
treee38acbbc143220e87a2226b55832264d970fc144 /tapsets.cxx
parent70208613b8f9f2584aee89197705f3fddae6a0e4 (diff)
downloadsystemtap-steved-b7aedf26f105793793c66c39c85abe76e1510e66.tar.gz
systemtap-steved-b7aedf26f105793793c66c39c85abe76e1510e66.tar.xz
systemtap-steved-b7aedf26f105793793c66c39c85abe76e1510e66.zip
Expand @defined to support more cases
* tapsets.cxx (var_expanding_visitor::visit_defined_op): If no error was raised or replacement made on a target_symbol, then its @defined state is still indeterminate. Some later pass (like @cast) might handle it. * elaborate.cxx (const_folder::visit_defined_op): Squash any escapees. * testsuite/semok/thirtysix.stp: Add more variants.
Diffstat (limited to 'tapsets.cxx')
-rw-r--r--tapsets.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/tapsets.cxx b/tapsets.cxx
index ca439ede..d470b043 100644
--- a/tapsets.cxx
+++ b/tapsets.cxx
@@ -1982,7 +1982,12 @@ var_expanding_visitor::visit_defined_op (defined_op* e)
else if (foo2 && foo2->probe_context_var != "") // successful
resolved = true;
else if (foo2) // unresolved but not marked either way
- assert (0); // should not happen
+ {
+ // it might be resolved by some other pass
+ e->operand = foo2;
+ provide (e);
+ return;
+ }
else // resolved, rewritten to some other expression type
resolved = true;
} catch (const semantic_error& e) {