2013-04-03 06:23:33 +00:00
|
|
|
// -*- mode: C++ -*-
|
2013-07-17 21:39:24 +00:00
|
|
|
//
|
2013-07-16 19:58:43 +00:00
|
|
|
// Copyright (C) 2013 Red Hat, Inc.
|
|
|
|
//
|
2013-07-17 21:39:24 +00:00
|
|
|
// This file is part of the GNU Application Binary Interface Generic
|
|
|
|
// Analysis and Instrumentation Library (libabigail). This library is
|
|
|
|
// free software; you can redistribute it and/or modify it under the
|
2013-07-16 19:58:43 +00:00
|
|
|
// terms of the GNU Lesser General Public License as published by the
|
|
|
|
// Free Software Foundation; either version 3, or (at your option) any
|
2013-07-17 21:39:24 +00:00
|
|
|
// later version.
|
|
|
|
|
|
|
|
// This library is distributed in the hope that it will be useful, but
|
|
|
|
// WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
2013-07-16 19:58:43 +00:00
|
|
|
// General Lesser Public License for more details.
|
2013-07-17 21:39:24 +00:00
|
|
|
|
2013-07-16 19:58:43 +00:00
|
|
|
// You should have received a copy of the GNU Lesser General Public
|
|
|
|
// License along with this program; see the file COPYING-LGPLV3. If
|
|
|
|
// not, see <http://www.gnu.org/licenses/>.
|
2013-07-17 21:39:24 +00:00
|
|
|
|
2013-04-03 06:23:33 +00:00
|
|
|
/// @file
|
Parse type-decl and namespace-decl elements
* configure.ac: Add libxml2 dependencies.
* src/abg-corpus.{h,cc}: New files.
* src/abg-hash.{h,cc}: Likewise.
* src/abg-libxml-utils.{h,cc}: Likewise.
* src/abg-reader.{h,cc}: Likewise.
* src/abg-serialize.{h,cc}: Likewise.
* src/abg-writer.h: Likewise.
* src/Makefile.am: Build the new files above.
* src/abg-ir.h (class location): Add public accessors for the value, and
a truth operator. Make the methods be inline.
(class decl_base): Renamed decl into this. Renamed what_decl_kind
into what_kind. Renamed get_context into get_scope. Add virtual
destructor, accessors for location and name.
(class {scope_decl, type_base, type_decl} ): Add virtual dtor.
Re-style.
(struct {decl_base_hash, type_decl_hash}): New hashing functors.
(class {scope_type_decl, namespace_decl}): Add virtual dtor.
* src/abg-ir.cc (location::*): Remove location definitions. There
are now inline in the header.
(class decl_base): Renamed decl into this. Remove most of the
definitions from here as their are now inline in the header.
(scope_decl::~scope_decl, type_base::~type_base)
(type_decl::~type_decl, scope_type_decl::~scope_type_decl): New
definitions.
2013-03-08 12:49:05 +00:00
|
|
|
|
|
|
|
#ifndef __ABG_CORPUS_H__
|
|
|
|
#define __ABG_CORPUS_H__
|
|
|
|
|
|
|
|
#include <tr1/memory>
|
2013-08-08 14:56:06 +00:00
|
|
|
#include "abg-fwd.h"
|
|
|
|
#include "abg-traverse.h"
|
Parse type-decl and namespace-decl elements
* configure.ac: Add libxml2 dependencies.
* src/abg-corpus.{h,cc}: New files.
* src/abg-hash.{h,cc}: Likewise.
* src/abg-libxml-utils.{h,cc}: Likewise.
* src/abg-reader.{h,cc}: Likewise.
* src/abg-serialize.{h,cc}: Likewise.
* src/abg-writer.h: Likewise.
* src/Makefile.am: Build the new files above.
* src/abg-ir.h (class location): Add public accessors for the value, and
a truth operator. Make the methods be inline.
(class decl_base): Renamed decl into this. Renamed what_decl_kind
into what_kind. Renamed get_context into get_scope. Add virtual
destructor, accessors for location and name.
(class {scope_decl, type_base, type_decl} ): Add virtual dtor.
Re-style.
(struct {decl_base_hash, type_decl_hash}): New hashing functors.
(class {scope_type_decl, namespace_decl}): Add virtual dtor.
* src/abg-ir.cc (location::*): Remove location definitions. There
are now inline in the header.
(class decl_base): Renamed decl into this. Remove most of the
definitions from here as their are now inline in the header.
(scope_decl::~scope_decl, type_base::~type_base)
(type_decl::~type_decl, scope_type_decl::~scope_type_decl): New
definitions.
2013-03-08 12:49:05 +00:00
|
|
|
|
|
|
|
namespace abigail
|
|
|
|
{
|
Introduce/use translation_unit & global_scope types
* abg-corpus.h (abi_corpus::{get_decls, get_loc_mgr}): Remove.
(abi_corpus::add): New function to add a translation unit.
(abi_corpus::get_translation_units): New declaration.
* abg-corpus.cc (abi_corpus::*): Remove all the definitions of
abi_corpus for now, as the abi_corpus type is not used anymore --
for now at least.
* src/abg-ir.h (add_decl_to_scope, get_global_scope)
(get_translation_unit, is_global_scope, is_decl_at_global_scope)
(class translation_unit, class global_scope): New declarations
* src/abg-ir.cc (translation_unit::translation_unit)
(translation_unit::get_global_scope)
(translation_unit::get_loc_mgr, translation_unit::get_loc_mgr)
(translation_unit::is_empty, get_global_scope)
(get_translation_unit, is_global_scope, is_global_scope)
(is_decl_at_global_scope, global_scope::~global_scope): New
definitions.
(scope_decl::scope_decl, scope_decl::scope_decl)
(scope_decl::add_member_decl, scope_decl::get_member_decls): Move
to abg-ir.h, inline.
* src/abg-reader.h (read_file): Don't use abi_corpus in the api.
Rather, use translation_unit.
* src/abg-reader.cc (read_context::get_cur_scope): Now that we
have a specific instance of global_scope to represent global
scope, don't play games with empty scopes to detect a global
scope.
(read_context::get_translation_unit): New definition.
(read_context::finish_decl_creation, finish_type_decl_creation):
(read_input, read_file, read_location, handle_element)
(handle_type_decl)
(handle_namespace_decl, handle_qualified_type_decl)
(handle_pointer_type_def, handle_reference_type_def)
(handle_enum_type_decl, handle_typedef_decl, handle_var_decl):
Don't use abi_corpus anymore. Rather, the translation unit a decl
belongs to is accessible from the decl itself.
* src/abg-writer.h (write_to_ostream): Use translation_unit in
this API, rather than abi_corpus.
* src/abg-writer.cc (write_translation_unit): Rename write_corpus
into this. And stop using abi_corpus here.
(write_to_ostream, write_corpus, write_location, write_decl)
(write_type_decl, write_namespace_decl, write_qualified_type_def)
(write_pointer_type_def, write_reference_type_def)
(write_enum_type_decl, write_typedef_decl, write_var_decl): Stop
using abi_corpus. Use the translation_unit that is accessible
from the decl being serialized, if need be.
* test-read-write.cc (main): De-serialize the input into an
instance of translation_unit, not an abi_corpus anymore, and
serialize that translation_unit.
2013-04-03 12:36:22 +00:00
|
|
|
|
2013-08-08 14:56:06 +00:00
|
|
|
/// @brief The source location of a token.
|
|
|
|
///
|
|
|
|
/// This represents the location of a token coming from a given ABI
|
|
|
|
/// Corpus. This location is actually an abstraction of cursor in the
|
|
|
|
/// table of all the locations of all the tokens of the ABI Corpus.
|
|
|
|
/// That table is managed by the location_manager type.
|
|
|
|
class location
|
|
|
|
{
|
|
|
|
unsigned m_value;
|
|
|
|
|
|
|
|
location(unsigned v) : m_value(v) { }
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
location() : m_value(0) { }
|
|
|
|
|
|
|
|
unsigned
|
|
|
|
get_value() const
|
|
|
|
{ return m_value; }
|
|
|
|
|
|
|
|
operator bool() const
|
|
|
|
{ return !!m_value; }
|
|
|
|
|
|
|
|
bool
|
|
|
|
operator==(const location other) const
|
|
|
|
{ return m_value == other.m_value; }
|
|
|
|
|
|
|
|
bool
|
|
|
|
operator<(const location other) const
|
|
|
|
{ return m_value < other.m_value; }
|
|
|
|
|
|
|
|
friend class location_manager;
|
|
|
|
};
|
|
|
|
|
|
|
|
/// @brief The entry point to manage locations.
|
|
|
|
///
|
|
|
|
/// This type keeps a table of all the locations for tokens of a
|
|
|
|
/// given ABI Corpus
|
|
|
|
class location_manager
|
|
|
|
{
|
|
|
|
struct _Impl;
|
|
|
|
|
|
|
|
/// Pimpl.
|
|
|
|
shared_ptr<_Impl> m_priv;
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
location_manager();
|
|
|
|
|
|
|
|
/// Insert the triplet representing a source locus into our internal
|
|
|
|
/// vector of location triplet. Return an instance of location type,
|
|
|
|
/// built from an integral type that represents the index of the
|
|
|
|
/// source locus triplet into our source locus table.
|
|
|
|
///
|
|
|
|
/// @param fle the file path of the source locus
|
|
|
|
/// @param lne the line number of the source location
|
|
|
|
/// @param col the column number of the source location
|
|
|
|
location
|
|
|
|
create_new_location(const std::string& fle, size_t lne, size_t col);
|
|
|
|
|
|
|
|
/// Given an instance of location type, return the triplet
|
|
|
|
/// {path,line,column} that represents the source locus. Note that
|
|
|
|
/// the location must have been previously created from the function
|
|
|
|
/// location_manager::expand_location otherwise this function yields
|
|
|
|
/// unexpected results, including possibly a crash.
|
|
|
|
///
|
|
|
|
/// @param location the instance of location type to expand
|
|
|
|
/// @param path the resulting path of the source locus
|
|
|
|
/// @param line the resulting line of the source locus
|
|
|
|
/// @param column the resulting colum of the source locus
|
|
|
|
void
|
|
|
|
expand_location(const location location, std::string& path,
|
|
|
|
unsigned& line, unsigned& column) const;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/// This is the abstraction of the set of relevant artefacts (types,
|
|
|
|
/// variable declarations, functions, templates, etc) bundled together
|
|
|
|
/// into a translation unit.
|
|
|
|
class translation_unit : public traversable_base
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
typedef shared_ptr<global_scope> global_scope_sptr;
|
|
|
|
|
|
|
|
private:
|
|
|
|
std::string m_path;
|
|
|
|
location_manager m_loc_mgr;
|
|
|
|
mutable global_scope_sptr m_global_scope;
|
|
|
|
|
|
|
|
// Forbidden
|
|
|
|
translation_unit();
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
/// Constructor of translation_unit.
|
|
|
|
///
|
|
|
|
/// @param path the location of the translation unit.
|
|
|
|
translation_unit(const std::string& path);
|
|
|
|
|
|
|
|
virtual ~translation_unit();
|
|
|
|
|
|
|
|
/// @return the path of the compilation unit that gave birth to this
|
|
|
|
/// instance of tranlation_unit.
|
|
|
|
const std::string&
|
|
|
|
get_path() const;
|
|
|
|
|
|
|
|
/// Getter of the the global scope of the translation unit.
|
|
|
|
///
|
|
|
|
/// @return the global scope of the current translation unit. If
|
|
|
|
/// there is not global scope allocated yet, this function creates one
|
|
|
|
/// and returns it.
|
|
|
|
const global_scope_sptr
|
|
|
|
get_global_scope() const;
|
|
|
|
|
|
|
|
/// Getter of the location manager for the current translation unit.
|
|
|
|
///
|
|
|
|
/// @return a reference to the location manager for the current
|
|
|
|
/// translation unit.
|
|
|
|
location_manager&
|
|
|
|
get_loc_mgr();
|
|
|
|
|
|
|
|
/// const Getter of the location manager.
|
|
|
|
///
|
|
|
|
/// @return a const reference to the location manager for the current
|
|
|
|
/// translation unit.
|
|
|
|
const location_manager&
|
|
|
|
get_loc_mgr() const;
|
|
|
|
|
|
|
|
/// Tests whether if the current translation unit contains ABI
|
|
|
|
/// artifacts or not.
|
|
|
|
///
|
|
|
|
/// @return true iff the current translation unit is empty.
|
|
|
|
bool
|
|
|
|
is_empty() const;
|
|
|
|
|
|
|
|
/// Deserialize the contents of the external file into this
|
|
|
|
/// translation_unit object.
|
|
|
|
bool
|
|
|
|
read();
|
|
|
|
|
|
|
|
/// Serialize the contents of this translation unit object into an
|
|
|
|
/// external file.
|
|
|
|
///
|
|
|
|
/// @param out the ostream output object.
|
|
|
|
bool
|
|
|
|
write(std::ostream& out);
|
|
|
|
|
|
|
|
/// This implements the traversable_base::traverse pure virtual
|
|
|
|
/// function.
|
|
|
|
///
|
|
|
|
/// @param v the visitor used on the member nodes of the translation
|
|
|
|
/// unit during the traversal.
|
|
|
|
void
|
|
|
|
traverse(ir_node_visitor& v);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
Introduce/use translation_unit & global_scope types
* abg-corpus.h (abi_corpus::{get_decls, get_loc_mgr}): Remove.
(abi_corpus::add): New function to add a translation unit.
(abi_corpus::get_translation_units): New declaration.
* abg-corpus.cc (abi_corpus::*): Remove all the definitions of
abi_corpus for now, as the abi_corpus type is not used anymore --
for now at least.
* src/abg-ir.h (add_decl_to_scope, get_global_scope)
(get_translation_unit, is_global_scope, is_decl_at_global_scope)
(class translation_unit, class global_scope): New declarations
* src/abg-ir.cc (translation_unit::translation_unit)
(translation_unit::get_global_scope)
(translation_unit::get_loc_mgr, translation_unit::get_loc_mgr)
(translation_unit::is_empty, get_global_scope)
(get_translation_unit, is_global_scope, is_global_scope)
(is_decl_at_global_scope, global_scope::~global_scope): New
definitions.
(scope_decl::scope_decl, scope_decl::scope_decl)
(scope_decl::add_member_decl, scope_decl::get_member_decls): Move
to abg-ir.h, inline.
* src/abg-reader.h (read_file): Don't use abi_corpus in the api.
Rather, use translation_unit.
* src/abg-reader.cc (read_context::get_cur_scope): Now that we
have a specific instance of global_scope to represent global
scope, don't play games with empty scopes to detect a global
scope.
(read_context::get_translation_unit): New definition.
(read_context::finish_decl_creation, finish_type_decl_creation):
(read_input, read_file, read_location, handle_element)
(handle_type_decl)
(handle_namespace_decl, handle_qualified_type_decl)
(handle_pointer_type_def, handle_reference_type_def)
(handle_enum_type_decl, handle_typedef_decl, handle_var_decl):
Don't use abi_corpus anymore. Rather, the translation unit a decl
belongs to is accessible from the decl itself.
* src/abg-writer.h (write_to_ostream): Use translation_unit in
this API, rather than abi_corpus.
* src/abg-writer.cc (write_translation_unit): Rename write_corpus
into this. And stop using abi_corpus here.
(write_to_ostream, write_corpus, write_location, write_decl)
(write_type_decl, write_namespace_decl, write_qualified_type_def)
(write_pointer_type_def, write_reference_type_def)
(write_enum_type_decl, write_typedef_decl, write_var_decl): Stop
using abi_corpus. Use the translation_unit that is accessible
from the decl being serialized, if need be.
* test-read-write.cc (main): De-serialize the input into an
instance of translation_unit, not an abi_corpus anymore, and
serialize that translation_unit.
2013-04-03 12:36:22 +00:00
|
|
|
/// This is the abstraction of a set of translation units (themselves
|
|
|
|
/// seen as bundles of unitary abi artefacts like types and decls)
|
|
|
|
/// bundled together as a corpus. A corpus is thus the Application
|
|
|
|
/// binary interface of a program, a library or just a set of modules
|
|
|
|
/// put together.
|
2013-08-07 00:03:28 +00:00
|
|
|
class corpus
|
Parse type-decl and namespace-decl elements
* configure.ac: Add libxml2 dependencies.
* src/abg-corpus.{h,cc}: New files.
* src/abg-hash.{h,cc}: Likewise.
* src/abg-libxml-utils.{h,cc}: Likewise.
* src/abg-reader.{h,cc}: Likewise.
* src/abg-serialize.{h,cc}: Likewise.
* src/abg-writer.h: Likewise.
* src/Makefile.am: Build the new files above.
* src/abg-ir.h (class location): Add public accessors for the value, and
a truth operator. Make the methods be inline.
(class decl_base): Renamed decl into this. Renamed what_decl_kind
into what_kind. Renamed get_context into get_scope. Add virtual
destructor, accessors for location and name.
(class {scope_decl, type_base, type_decl} ): Add virtual dtor.
Re-style.
(struct {decl_base_hash, type_decl_hash}): New hashing functors.
(class {scope_type_decl, namespace_decl}): Add virtual dtor.
* src/abg-ir.cc (location::*): Remove location definitions. There
are now inline in the header.
(class decl_base): Renamed decl into this. Remove most of the
definitions from here as their are now inline in the header.
(scope_decl::~scope_decl, type_base::~type_base)
(type_decl::~type_decl, scope_type_decl::~scope_type_decl): New
definitions.
2013-03-08 12:49:05 +00:00
|
|
|
{
|
2013-08-02 03:16:22 +00:00
|
|
|
public:
|
|
|
|
typedef std::string string;
|
|
|
|
typedef std::tr1::shared_ptr<translation_unit> translation_unit_sptr;
|
|
|
|
typedef std::list<translation_unit_sptr> translation_units;
|
|
|
|
|
|
|
|
private:
|
|
|
|
string m_name;
|
|
|
|
translation_units m_members;
|
|
|
|
|
2013-08-07 00:03:28 +00:00
|
|
|
corpus();
|
Parse type-decl and namespace-decl elements
* configure.ac: Add libxml2 dependencies.
* src/abg-corpus.{h,cc}: New files.
* src/abg-hash.{h,cc}: Likewise.
* src/abg-libxml-utils.{h,cc}: Likewise.
* src/abg-reader.{h,cc}: Likewise.
* src/abg-serialize.{h,cc}: Likewise.
* src/abg-writer.h: Likewise.
* src/Makefile.am: Build the new files above.
* src/abg-ir.h (class location): Add public accessors for the value, and
a truth operator. Make the methods be inline.
(class decl_base): Renamed decl into this. Renamed what_decl_kind
into what_kind. Renamed get_context into get_scope. Add virtual
destructor, accessors for location and name.
(class {scope_decl, type_base, type_decl} ): Add virtual dtor.
Re-style.
(struct {decl_base_hash, type_decl_hash}): New hashing functors.
(class {scope_type_decl, namespace_decl}): Add virtual dtor.
* src/abg-ir.cc (location::*): Remove location definitions. There
are now inline in the header.
(class decl_base): Renamed decl into this. Remove most of the
definitions from here as their are now inline in the header.
(scope_decl::~scope_decl, type_base::~type_base)
(type_decl::~type_decl, scope_type_decl::~scope_type_decl): New
definitions.
2013-03-08 12:49:05 +00:00
|
|
|
|
|
|
|
public:
|
2013-03-21 13:43:30 +00:00
|
|
|
|
2013-08-07 00:03:28 +00:00
|
|
|
corpus(const string&);
|
Parse type-decl and namespace-decl elements
* configure.ac: Add libxml2 dependencies.
* src/abg-corpus.{h,cc}: New files.
* src/abg-hash.{h,cc}: Likewise.
* src/abg-libxml-utils.{h,cc}: Likewise.
* src/abg-reader.{h,cc}: Likewise.
* src/abg-serialize.{h,cc}: Likewise.
* src/abg-writer.h: Likewise.
* src/Makefile.am: Build the new files above.
* src/abg-ir.h (class location): Add public accessors for the value, and
a truth operator. Make the methods be inline.
(class decl_base): Renamed decl into this. Renamed what_decl_kind
into what_kind. Renamed get_context into get_scope. Add virtual
destructor, accessors for location and name.
(class {scope_decl, type_base, type_decl} ): Add virtual dtor.
Re-style.
(struct {decl_base_hash, type_decl_hash}): New hashing functors.
(class {scope_type_decl, namespace_decl}): Add virtual dtor.
* src/abg-ir.cc (location::*): Remove location definitions. There
are now inline in the header.
(class decl_base): Renamed decl into this. Remove most of the
definitions from here as their are now inline in the header.
(scope_decl::~scope_decl, type_base::~type_base)
(type_decl::~type_decl, scope_type_decl::~scope_type_decl): New
definitions.
2013-03-08 12:49:05 +00:00
|
|
|
|
2013-03-21 13:43:30 +00:00
|
|
|
void
|
2013-08-02 03:16:22 +00:00
|
|
|
add(const translation_unit_sptr);
|
2013-03-21 13:43:30 +00:00
|
|
|
|
2013-08-02 03:16:22 +00:00
|
|
|
const translation_units&
|
Introduce/use translation_unit & global_scope types
* abg-corpus.h (abi_corpus::{get_decls, get_loc_mgr}): Remove.
(abi_corpus::add): New function to add a translation unit.
(abi_corpus::get_translation_units): New declaration.
* abg-corpus.cc (abi_corpus::*): Remove all the definitions of
abi_corpus for now, as the abi_corpus type is not used anymore --
for now at least.
* src/abg-ir.h (add_decl_to_scope, get_global_scope)
(get_translation_unit, is_global_scope, is_decl_at_global_scope)
(class translation_unit, class global_scope): New declarations
* src/abg-ir.cc (translation_unit::translation_unit)
(translation_unit::get_global_scope)
(translation_unit::get_loc_mgr, translation_unit::get_loc_mgr)
(translation_unit::is_empty, get_global_scope)
(get_translation_unit, is_global_scope, is_global_scope)
(is_decl_at_global_scope, global_scope::~global_scope): New
definitions.
(scope_decl::scope_decl, scope_decl::scope_decl)
(scope_decl::add_member_decl, scope_decl::get_member_decls): Move
to abg-ir.h, inline.
* src/abg-reader.h (read_file): Don't use abi_corpus in the api.
Rather, use translation_unit.
* src/abg-reader.cc (read_context::get_cur_scope): Now that we
have a specific instance of global_scope to represent global
scope, don't play games with empty scopes to detect a global
scope.
(read_context::get_translation_unit): New definition.
(read_context::finish_decl_creation, finish_type_decl_creation):
(read_input, read_file, read_location, handle_element)
(handle_type_decl)
(handle_namespace_decl, handle_qualified_type_decl)
(handle_pointer_type_def, handle_reference_type_def)
(handle_enum_type_decl, handle_typedef_decl, handle_var_decl):
Don't use abi_corpus anymore. Rather, the translation unit a decl
belongs to is accessible from the decl itself.
* src/abg-writer.h (write_to_ostream): Use translation_unit in
this API, rather than abi_corpus.
* src/abg-writer.cc (write_translation_unit): Rename write_corpus
into this. And stop using abi_corpus here.
(write_to_ostream, write_corpus, write_location, write_decl)
(write_type_decl, write_namespace_decl, write_qualified_type_def)
(write_pointer_type_def, write_reference_type_def)
(write_enum_type_decl, write_typedef_decl, write_var_decl): Stop
using abi_corpus. Use the translation_unit that is accessible
from the decl being serialized, if need be.
* test-read-write.cc (main): De-serialize the input into an
instance of translation_unit, not an abi_corpus anymore, and
serialize that translation_unit.
2013-04-03 12:36:22 +00:00
|
|
|
get_translation_units() const;
|
2013-03-21 13:43:30 +00:00
|
|
|
|
|
|
|
bool
|
|
|
|
is_empty() const;
|
2013-08-02 03:16:22 +00:00
|
|
|
};
|
Parse type-decl and namespace-decl elements
* configure.ac: Add libxml2 dependencies.
* src/abg-corpus.{h,cc}: New files.
* src/abg-hash.{h,cc}: Likewise.
* src/abg-libxml-utils.{h,cc}: Likewise.
* src/abg-reader.{h,cc}: Likewise.
* src/abg-serialize.{h,cc}: Likewise.
* src/abg-writer.h: Likewise.
* src/Makefile.am: Build the new files above.
* src/abg-ir.h (class location): Add public accessors for the value, and
a truth operator. Make the methods be inline.
(class decl_base): Renamed decl into this. Renamed what_decl_kind
into what_kind. Renamed get_context into get_scope. Add virtual
destructor, accessors for location and name.
(class {scope_decl, type_base, type_decl} ): Add virtual dtor.
Re-style.
(struct {decl_base_hash, type_decl_hash}): New hashing functors.
(class {scope_type_decl, namespace_decl}): Add virtual dtor.
* src/abg-ir.cc (location::*): Remove location definitions. There
are now inline in the header.
(class decl_base): Renamed decl into this. Remove most of the
definitions from here as their are now inline in the header.
(scope_decl::~scope_decl, type_base::~type_base)
(type_decl::~type_decl, scope_type_decl::~scope_type_decl): New
definitions.
2013-03-08 12:49:05 +00:00
|
|
|
}//end namespace abigail
|
|
|
|
#endif //__ABG_CORPUS_H__
|