summaryrefslogtreecommitdiffstats
path: root/staptree.h
diff options
context:
space:
mode:
Diffstat (limited to 'staptree.h')
-rw-r--r--staptree.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/staptree.h b/staptree.h
index 16f0256a..70746f31 100644
--- a/staptree.h
+++ b/staptree.h
@@ -229,9 +229,24 @@ struct target_symbol: public symbol
comp_struct_member,
comp_literal_array_index
};
+
+ struct component
+ {
+ const token* tok;
+ component_type type;
+ std::string member; // comp_struct_member
+ int64_t num_index; // comp_literal_array_index
+
+ component(const token* t, const std::string& m):
+ tok(t), type(comp_struct_member), member(m), num_index(0) {}
+ component(const token* t, int64_t n):
+ tok(t), type(comp_literal_array_index), num_index(n) {}
+ void print (std::ostream& o) const;
+ };
+
bool addressof;
std::string base_name;
- std::vector<std::pair<component_type, std::string> > components;
+ std::vector<component> components;
std::string probe_context_var;
semantic_error* saved_conversion_error;
target_symbol(): addressof(false), saved_conversion_error (0) {}
@@ -239,6 +254,8 @@ struct target_symbol: public symbol
void visit (visitor* u);
};
+std::ostream& operator << (std::ostream& o, const target_symbol::component& c);
+
struct cast_op: public target_symbol
{