diff options
-rw-r--r-- | odb/parser.cxx | 8 | ||||
-rw-r--r-- | odb/pragma.cxx | 5 | ||||
-rw-r--r-- | odb/pragma.hxx | 5 |
3 files changed, 14 insertions, 4 deletions
diff --git a/odb/parser.cxx b/odb/parser.cxx index fda4579..16612df 100644 --- a/odb/parser.cxx +++ b/odb/parser.cxx @@ -1886,6 +1886,10 @@ process_pragmas (tree t, tmp[j] = '-'; node.set (tmp, i->value); + + if (i->node != 0) + node.set (tmp + "-node", i->node); + node.set (tmp + "-loc", i->loc); } } @@ -1917,6 +1921,10 @@ process_named_pragmas (tree t, node& node) tmp[j] = '-'; node.set (tmp, i->value); + + if (i->node != 0) + node.set (tmp + "-node", i->node); + node.set (tmp + "-loc", i->loc); } } diff --git a/odb/pragma.cxx b/odb/pragma.cxx index 6fea208..bf1b1d1 100644 --- a/odb/pragma.cxx +++ b/odb/pragma.cxx @@ -259,6 +259,7 @@ handle_pragma (cpp_reader* reader, cpp_ttype tt; string val; + tree node (0); location_t loc (input_location); if (p == "table") @@ -663,7 +664,7 @@ handle_pragma (cpp_reader* reader, // Record this pragma. // - pragma prag (p, val, loc); + pragma prag (p, val, node, loc); if (decl) decl_pragmas_[decl].insert (prag); @@ -857,7 +858,7 @@ handle_pragma_qualifier (cpp_reader* reader, string const& p) // Record this pragma. // - pragma prag (p, "", loc); + pragma prag (p, "", 0, loc); if (decl) decl_pragmas_[decl].insert (prag); diff --git a/odb/pragma.hxx b/odb/pragma.hxx index f5714eb..d8c4ab5 100644 --- a/odb/pragma.hxx +++ b/odb/pragma.hxx @@ -15,8 +15,8 @@ struct pragma { - pragma (std::string const& n, std::string const& v, location_t l) - : name (n), value (v), loc (l) + pragma (std::string const& n, std::string const& v, tree tn, location_t l) + : name (n), value (v), node (tn), loc (l) { } @@ -28,6 +28,7 @@ struct pragma std::string name; std::string value; + tree node; location_t loc; }; |