summaryrefslogtreecommitdiff
path: root/odb/semantics/elements.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2010-11-15 12:34:44 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2010-11-15 12:34:44 +0200
commitde2acaa079cbf6bcb1db8fecd956789360d9dd5c (patch)
tree5f8f2dfaf0cb39d6074b4d77a5654f3b4a476825 /odb/semantics/elements.hxx
parentb926362a9c1276ee15b5f961e912d8d37369e40b (diff)
Maintain GCC tree node for all semantic graph nodes
Diffstat (limited to 'odb/semantics/elements.hxx')
-rw-r--r--odb/semantics/elements.hxx44
1 files changed, 15 insertions, 29 deletions
diff --git a/odb/semantics/elements.hxx b/odb/semantics/elements.hxx
index f5d4954..2e8908e 100644
--- a/odb/semantics/elements.hxx
+++ b/odb/semantics/elements.hxx
@@ -93,6 +93,13 @@ namespace semantics
~node () {}
public:
+ tree
+ tree_node () const
+ {
+ return tree_node_;
+ }
+
+ public:
path const&
file () const
{
@@ -120,7 +127,7 @@ namespace semantics
}
public:
- node (path const& file, size_t line, size_t column);
+ node (path const& file, size_t line, size_t column, tree);
// Sink functions that allow extensions in the form of one-way
// edges.
@@ -136,6 +143,8 @@ namespace semantics
node ();
private:
+ tree tree_node_;
+
path file_;
size_t line_;
size_t column_;
@@ -388,8 +397,8 @@ namespace semantics
find (names&);
public:
- scope (path const& file, size_t line, size_t column)
- : node (file, line, column)
+ scope (path const& file, size_t line, size_t column, tree tn)
+ : node (file, line, column, tn)
{
}
@@ -419,13 +428,6 @@ namespace semantics
typedef std::vector<qualifies*> qualified;
public:
- tree
- tree_node () const
- {
- return tree_node_;
- }
-
- public:
typedef pointer_iterator<qualified::const_iterator> qualified_iterator;
qualified_iterator
@@ -454,23 +456,7 @@ namespace semantics
using nameable::add_edge_right;
- protected:
- type (tree tn)
- : tree_node_ (tn)
- {
- }
-
- // For virtual inheritance. Should never be actually called.
- //
- type ()
- {
- // GCC plugin machinery #define's abort as a macro.
- //
- abort ();
- }
-
private:
- tree tree_node_;
qualified qualified_;
};
@@ -574,8 +560,8 @@ namespace semantics
class data_member: public nameable, public instance
{
public:
- data_member (path const& file, size_t line, size_t column)
- : node (file, line, column)
+ data_member (path const& file, size_t line, size_t column, tree tn)
+ : node (file, line, column, tn)
{
}
};
@@ -597,7 +583,7 @@ namespace semantics
size_t column,
tree tn,
string const& type_name)
- : node (file, line, column), type (tn), type_name_ (type_name)
+ : node (file, line, column, tn), type_name_ (type_name)
{
}