Add translation_unit::get_path

* src/abg-ir.cc (translation_unit::get_path): New declaration.
	* src/abg-ir.cc (translation_unit::get_path): New definition.
This commit is contained in:
Dodji Seketeli 2013-05-23 17:34:59 +02:00 committed by Dodji Seketeli
parent 85af4588e7
commit 750b14c159
2 changed files with 11 additions and 0 deletions

View File

@ -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

View File

@ -165,6 +165,9 @@ public:
translation_unit(const std::string& path);
const std::string&
get_path() const;
const shared_ptr<global_scope>
get_global_scope() const;