summaryrefslogtreecommitdiff
path: root/odb/semantics/elements.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2010-03-29 11:40:32 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2010-03-29 11:40:32 +0200
commit16692f69f3ce5e533c835b553bd00e149191fd9c (patch)
tree1c0a0b6f45499aae413401c1f377ba7b4ef1cdab /odb/semantics/elements.hxx
parent02900cdf9a156e631b16c4360c8cb7e6484b004f (diff)
Assign tree nodes to graph type nodes
Diffstat (limited to 'odb/semantics/elements.hxx')
-rw-r--r--odb/semantics/elements.hxx30
1 files changed, 20 insertions, 10 deletions
diff --git a/odb/semantics/elements.hxx b/odb/semantics/elements.hxx
index 97f386f..969f33a 100644
--- a/odb/semantics/elements.hxx
+++ b/odb/semantics/elements.hxx
@@ -36,10 +36,6 @@ namespace semantics
using compiler::context;
- // GCC parse tree node.
- //
- typedef ::tree gcc_tree;
-
//
//
using fs::path;
@@ -422,6 +418,13 @@ 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
@@ -437,11 +440,6 @@ namespace semantics
}
public:
- type (path const& file, size_t line, size_t column)
- : node (file, line, column)
- {
- }
-
void
add_edge_right (belongs&)
{
@@ -456,11 +454,22 @@ 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_;
};
@@ -570,8 +579,9 @@ namespace semantics
unsupported_type (path const& file,
size_t line,
size_t column,
+ tree tn,
string const& type_name)
- : node (file, line, column), type_name_ (type_name)
+ : node (file, line, column), type (tn), type_name_ (type_name)
{
}