// -*- Mode: C++ -*-
//
// Copyright (C) 2013-2015 Red Hat, Inc.
//
// 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
// terms of the GNU Lesser General Public License as published by the
// Free Software Foundation; either version 3, or (at your option) any
// 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
// General Lesser Public License for more details.
// 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 .
/// @file
#ifndef __ABG_IRFWD_H__
#define __ABG_IRFWD_H__
#include
#include
#include
#include
#include
#include
#include
#include // for std::rel_ops, at least.
#include
#include "abg-hash.h"
/// Toplevel namespace for libabigail.
namespace abigail
{
/**
@mainpage libabigail
This is the API documentation of the Application Binary
Interface Generic Analysis and Instrumentation Library, aka,
libabigail.
Check out the project
homepage!
The current libabigail source code can be browsed at
http://sourceware.org/git/gitweb.cgi?p=libabigail.git
It can be checked out with:
git clone git://sourceware.org/git/libabigail.git
The mailing list to send messages and patches to is
libabigail@sourceware.org.
You can hang out with libabigail developers and users on irc at
irc://irc.oftc.net\#libabigail.
*/
// Inject some types.
using std::tr1::shared_ptr;
using std::tr1::weak_ptr;
using std::string;
using std::vector;
// Pull in relational operators.
using namespace std::rel_ops;
namespace ir
{
// Forward declarations for corpus.
class corpus;
// Forward declarations for ir.
class location;
class location_manager;
class translation_unit;
class class_decl;
class class_tdecl;
class decl_base;
class enum_type_decl;
class function_decl;
class function_tdecl;
class function_type;
class global_scope;
class node_visitor;
class location;
class location_manager;
class method_type;
class namespace_decl;
class parameter;
class pointer_type_def;
class qualified_type_def;
class reference_type_def;
class scope_decl;
class scope_type_decl;
class template_decl;
class template_parameter;
class non_type_tparameter;
class type_tparameter;
class template_tparameter;
class type_composition;
class type_base;
class type_decl;
class typedef_decl;
class var_decl;
class array_type_def;
class subrange_type;
struct type_shared_ptr_equal;
struct traversable_base;
shared_ptr
add_decl_to_scope(shared_ptr, scope_decl*);
shared_ptr
add_decl_to_scope (shared_ptr, shared_ptr);
const global_scope*
get_global_scope(const decl_base&);
const global_scope*
get_global_scope(const decl_base*);
const global_scope*
get_global_scope(const shared_ptr);
translation_unit*
get_translation_unit(const decl_base&);
translation_unit*
get_translation_unit(const decl_base*);
translation_unit*
get_translation_unit(const shared_ptr);
bool
is_global_scope(const scope_decl&);
bool
is_global_scope(const scope_decl*);
bool
is_global_scope(const shared_ptr);
bool
is_at_global_scope(const decl_base&);
bool
is_at_global_scope(const shared_ptr);
bool
is_at_class_scope(const shared_ptr);
bool
is_at_class_scope(const decl_base*);
bool
is_at_class_scope(const decl_base&);
bool
is_at_template_scope(const shared_ptr);
bool
is_template_parameter(const shared_ptr);
shared_ptr
is_function_decl(shared_ptr);
bool
is_type(const decl_base&);
shared_ptr
is_type(const shared_ptr);
shared_ptr
is_type_decl(const shared_ptr);
shared_ptr
is_typedef(const shared_ptr);
shared_ptr
is_typedef(const shared_ptr);
shared_ptr
is_enum_type(const shared_ptr&);
shared_ptr
is_enum_type(const shared_ptr&);
bool
is_class_type(decl_base*);
shared_ptr
is_class_type(const shared_ptr);
shared_ptr
is_class_type(const shared_ptr);
shared_ptr
is_pointer_type(const shared_ptr);
shared_ptr
is_reference_type(const shared_ptr);
shared_ptr
is_qualified_type(const shared_ptr);
shared_ptr
is_function_type(const shared_ptr);
shared_ptr
is_method_type(const shared_ptr);
shared_ptr
look_through_decl_only_class(shared_ptr);
shared_ptr
is_var_decl(const shared_ptr);
bool
is_template_parm_composition_type(const shared_ptr);
bool
is_template_decl(const shared_ptr);
bool
is_function_template_pattern(const shared_ptr);
shared_ptr
add_decl_to_scope(shared_ptr, scope_decl*);
shared_ptr
add_decl_to_scope(shared_ptr, shared_ptr);
shared_ptr
insert_decl_into_scope(shared_ptr,
vector >::iterator,
scope_decl*);
shared_ptr
insert_decl_into_scope(shared_ptr,
vector >::iterator,
shared_ptr);
bool
has_scope(const decl_base&);
bool
has_scope(const shared_ptr);
bool
is_member_decl(const shared_ptr);
bool
is_member_decl(const decl_base*);
bool
is_member_decl(const decl_base&);
bool
is_member_type(const shared_ptr);
void
remove_decl_from_scope(shared_ptr);
bool
get_member_is_static(const decl_base&);
bool
get_member_is_static(const decl_base*);
bool
get_member_is_static(const shared_ptr);
void
set_member_is_static(decl_base&, bool);
void
set_member_is_static(shared_ptr, bool);
bool
is_data_member(const var_decl&);
bool
is_data_member(const var_decl*);
bool
is_data_member(const shared_ptr);
shared_ptr
is_data_member(const shared_ptr&);
shared_ptr
is_array_type(const shared_ptr decl);
void
set_data_member_offset(shared_ptr, size_t);
size_t
get_data_member_offset(const var_decl&);
size_t
get_data_member_offset(const shared_ptr);
size_t
get_data_member_offset(const shared_ptr);
void
set_data_member_is_laid_out(shared_ptr, bool);
bool
get_data_member_is_laid_out(const var_decl&);
bool
get_data_member_is_laid_out(const shared_ptr);
bool
is_member_function(const function_decl&);
bool
is_member_function(const function_decl*);
bool
is_member_function(const shared_ptr);
bool
get_member_function_is_ctor(const function_decl&);
bool
get_member_function_is_ctor(const shared_ptr);
void
set_member_function_is_ctor(const function_decl&, bool);
void
set_member_function_is_ctor(const shared_ptr, bool);
bool
get_member_function_is_dtor(const function_decl&);
bool
get_member_function_is_dtor(const shared_ptr);
void
set_member_function_is_dtor(const function_decl&, bool);
void
set_member_function_is_dtor(const shared_ptr, bool);
bool
get_member_function_is_const(const function_decl&);
bool
get_member_function_is_const(const shared_ptr);
void
set_member_function_is_const(const function_decl&, bool);
void
set_member_function_is_const(const shared_ptr, bool);
size_t
get_member_function_vtable_offset(const function_decl&);
size_t
get_member_function_vtable_offset(const shared_ptr);
void
set_member_function_vtable_offset(const function_decl& f,
size_t s);
void
set_member_function_vtable_offset(const shared_ptr f,
size_t s);
bool
get_member_function_is_virtual(const function_decl&);
bool
get_member_function_is_virtual(const shared_ptr);
bool
get_member_function_is_virtual(const function_decl*);
void
set_member_function_is_virtual(const function_decl&, bool);
void
set_member_function_is_virtual(const shared_ptr&, bool);
shared_ptr
strip_typedef(const shared_ptr);
string
get_type_name(const shared_ptr);
string
get_pretty_representation(const decl_base*);
string
get_pretty_representation(const type_base*);
string
get_pretty_representation(const shared_ptr&);
string
get_pretty_representation(const shared_ptr&);
const decl_base*
get_type_declaration(const type_base*);
decl_base*
get_type_declaration(type_base*);
shared_ptr
get_type_declaration(const shared_ptr);
bool
types_are_compatible(const shared_ptr,
const shared_ptr);
bool
types_are_compatible(const shared_ptr,
const shared_ptr);
const scope_decl*
get_top_most_scope_under(const decl_base*,
const scope_decl*);
const scope_decl*
get_top_most_scope_under(const shared_ptr,
const scope_decl*);
const scope_decl*
get_top_most_scope_under(const shared_ptr,
const shared_ptr);
void
fqn_to_components(const std::string&,
std::list&);
const shared_ptr
lookup_type_in_translation_unit(const string&,
const translation_unit&);
const shared_ptr
lookup_type_in_translation_unit(const std::list&,
const translation_unit&);
const shared_ptr
lookup_type_in_scope(const string&,
const shared_ptr);
const shared_ptr
lookup_type_in_scope(const std::list&,
const shared_ptr);
const shared_ptr
lookup_var_decl_in_scope(const string&,
const shared_ptr);
const shared_ptr
lookup_var_decl_in_scope(const std::list&,
const shared_ptr);
string
demangle_cplus_mangled_name(const string&);
shared_ptr
type_or_void(const shared_ptr);
bool
type_has_non_canonicalized_subtype(shared_ptr t);
} // end namespace ir
using namespace abigail::ir;
void
dump(const shared_ptr, std::ostream&);
void
dump(const shared_ptr);
void
dump(const shared_ptr, std::ostream&);
void
dump(const shared_ptr);
void
dump(const shared_ptr, std::ostream&);
void
dump(const shared_ptr);
void
dump(const translation_unit&, std::ostream&);
void
dump(const translation_unit&);
void
dump(const shared_ptr, std::ostream&);
void
dump(const shared_ptr);
void
dump_decl_location(const decl_base&);
void
dump_decl_location(const decl_base*);
void
dump_decl_location(const shared_ptr&);
} // end namespace abigail
#endif // __ABG_IRFWD_H__