From cb65012eb524eb57b00249f1dee0f245e947cda4 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sun, 13 Sep 2009 18:46:11 +0200 Subject: Use new path class, add context and generator classes Use cutl::fs::path instead of std::string in the semantic graph. Add context and generator stubs, to be filled next. Connect everything in the compiler driver. --- cli/semantics/elements.hxx | 7 ++++++- cli/semantics/unit.hxx | 10 +++++----- 2 files changed, 11 insertions(+), 6 deletions(-) (limited to 'cli/semantics') diff --git a/cli/semantics/elements.hxx b/cli/semantics/elements.hxx index f9b08fc..da9e031 100644 --- a/cli/semantics/elements.hxx +++ b/cli/semantics/elements.hxx @@ -15,6 +15,8 @@ #include // std::pair #include +#include + #include #include @@ -35,9 +37,11 @@ namespace semantics // // - typedef string path; typedef string name; + using fs::path; + using fs::invalid_path; + // // @@ -141,6 +145,7 @@ namespace semantics // For virtual inheritance. Should never be actually called. // node () + : file_ ("") { std::abort (); } diff --git a/cli/semantics/unit.hxx b/cli/semantics/unit.hxx index c15d172..a67e1ff 100644 --- a/cli/semantics/unit.hxx +++ b/cli/semantics/unit.hxx @@ -30,7 +30,7 @@ namespace semantics return *includer_; } - path + string const& file () const { return file_; @@ -39,7 +39,7 @@ namespace semantics protected: friend class graph; - includes (path const& file) + includes (string const& file) : file_ (file) { } @@ -51,7 +51,7 @@ namespace semantics } protected: - path file_; + string file_; cli_unit* includer_; }; @@ -69,7 +69,7 @@ namespace semantics protected: friend class graph; - cli_includes (path const& file) + cli_includes (string const& file) : includes (file) { } @@ -98,7 +98,7 @@ namespace semantics protected: friend class graph; - cxx_includes (path const& file) + cxx_includes (string const& file) : includes (file) { } -- cgit v1.1