Define translation_unit{_sptr,s} types in abigail::

* include/abg-corpus.h (abigail::corpus::{translation_unit_sptr,
	translation_units):  Do not define these typedefs here.  Rather)
	(define them ...
	* include/abg-ir.h
	(abigail::{translation_units,translation_unit_sptr): ... here.
	This is because a translation unit can be manipulated
	independently from an abi corpus.
	* src/abg-corpus.cc (corpus::get_translation_units): Adjust return
	type to comply with the change above.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
This commit is contained in:
Dodji Seketeli 2013-08-29 16:42:22 +02:00
parent 4989519a33
commit 0b8a16ef39
3 changed files with 6 additions and 5 deletions

View File

@ -36,10 +36,8 @@ namespace abigail
class corpus
{
public:
struct impl;
typedef std::string string;
typedef shared_ptr<translation_unit> translation_unit_sptr;
typedef std::vector<translation_unit_sptr> translation_units;
struct impl;
typedef std::string string;
private:
shared_ptr<impl> m_priv;

View File

@ -164,6 +164,9 @@ public:
traverse(ir_node_visitor& v);
};//end class translation_unit
typedef shared_ptr<translation_unit> translation_unit_sptr;
typedef std::vector<translation_unit_sptr> translation_units;
/// The base type of all declarations.
class decl_base : public traversable_base
{

View File

@ -214,7 +214,7 @@ struct corpus::impl
/// Return the list of translation units of the current corpus.
///
/// @return the list of translation units of the current corpus.
const corpus::translation_units&
const translation_units&
corpus::get_translation_units() const
{
return m_priv->members;