diff --git a/src/abg-ir.cc b/src/abg-ir.cc index d37a1d62..4b8982d2 100644 --- a/src/abg-ir.cc +++ b/src/abg-ir.cc @@ -173,6 +173,14 @@ translation_unit::get_global_scope() const return m_global_scope; } +/// \return the path of the compilation unit that gave birth to this +/// instance of tranlation_unit. +const std::string& +translation_unit::get_path() const +{ + return m_path; +} + /// Getter of the location manager for the current translation unit. /// /// \return a reference to the location manager for the current diff --git a/src/abg-ir.h b/src/abg-ir.h index be9ec8f7..92b7febe 100644 --- a/src/abg-ir.h +++ b/src/abg-ir.h @@ -165,6 +165,9 @@ public: translation_unit(const std::string& path); + const std::string& + get_path() const; + const shared_ptr get_global_scope() const;