libabigail
Loading...
Searching...
No Matches
abg-reader.h
Go to the documentation of this file.
1// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
2// -*- Mode: C++ -*-
3//
4// Copyright (C) 2013-2026 Red Hat, Inc.
5//
6// Author: Dodji Seketeli
7
8/// @file
9///
10/// This file contains the declarations of the entry points to
11/// de-serialize an instance of @ref abigail::translation_unit from an
12/// ABI Instrumentation file in libabigail native XML format.
13
14#ifndef __ABG_READER_H__
15#define __ABG_READER_H__
16
17#include <istream>
18#include "abg-corpus.h"
19#include "abg-suppression.h"
20#include "abg-fe-iface.h"
21
22namespace abigail
23{
24
25namespace abixml
26{
27
28using namespace abigail::ir;
29
31read_translation_unit_from_file(const std::string& file_path,
32 environment& env,
33 const fe_iface::options_type& opts);
34
36read_translation_unit_from_file(const std::string& file_path,
37 environment& env);
38
39
41read_translation_unit_from_buffer(const std::string& file_path,
42 environment& env,
43 const fe_iface::options_type& opts);
44
47 environment& env,
48 const fe_iface::options_type& opts);
49
52 environment& env);
53
56
57abigail::fe_iface_sptr
58create_reader(const string& path,
59 environment& env,
60 const fe_iface::options_type &opts);
61
62abigail::fe_iface_sptr
63create_reader(const string& path,
64 environment& env);
65
66fe_iface_sptr
67create_reader(std::istream* in, environment& env,
68 const fe_iface::options_type &opts);
69
70fe_iface_sptr
71create_reader(std::istream* in, environment& env);
72
73corpus_sptr
74read_corpus_from_abixml(std::istream* in,
75 environment& env,
76 const fe_iface::options_type &opts);
77
78corpus_sptr
79read_corpus_from_abixml(std::istream* in,
80 environment& env);
81
82corpus_sptr
83read_corpus_from_abixml_file(const string& path,
84 environment& env,
85 const fe_iface::options_type &opts);
86
87corpus_sptr
88read_corpus_from_abixml_file(const string& path,
89 environment& env);
90
91corpus_group_sptr
93
94corpus_group_sptr
95read_corpus_group_from_abixml(std::istream* in,
96 environment& env,
97 const fe_iface::options_type &opts);
98
99corpus_group_sptr
100read_corpus_group_from_abixml(std::istream* in,
101 environment& env);
102
103corpus_group_sptr
104read_corpus_group_from_abixml_file(const string& path,
105 environment& env,
106 const fe_iface::options_type &opts);
107
108corpus_group_sptr
109read_corpus_group_from_abixml_file(const string& path,
110 environment& env);
111
112void
114 bool flag);
115
116class reader;
117typedef shared_ptr<reader> reader_sptr;
118
119reader_sptr
120is_reader(fe_iface_sptr);
121
122#ifdef WITH_SHOW_TYPE_USE_IN_ABILINT
123vector<type_base_sptr>*
124get_types_from_type_id(fe_iface&, const string&);
125
126unordered_map<type_or_decl_base*, vector<type_or_decl_base*>>*
127get_artifact_used_by_relation_map(fe_iface&);
128#endif
129}//end abixml
130
131#ifdef WITH_DEBUG_SELF_COMPARISON
132bool
133load_canonical_type_ids(fe_iface& ctxt,
134 const string& file_path);
135#endif
136}//end namespace abigail
137
138#endif // __ABG_READER_H__
This file contains the declarations for the fe_iface a.k.a "Front End Interface".
The base class of all libabigail front-ends: The Front End Interface.
This is an abstraction of the set of resources necessary to manage several aspects of the internal re...
Definition abg-ir.h:216
corpus_sptr read_corpus_from_abixml_file(const string &path, environment &env, const fe_iface::options_type &opts)
De-serialize an ABI corpus from an XML document file which root node is 'abi-corpus'.
translation_unit_sptr read_translation_unit(fe_iface &iface)
Parse a translation unit from an abixml input from a given context.
translation_unit_sptr read_translation_unit_from_istream(istream *in, environment &env, const fe_iface::options_type &opts)
De-serialize a translation unit from an ABI Instrumentation xml file coming from an input stream.
translation_unit_sptr read_translation_unit_from_file(const string &input_file, environment &env, const fe_iface::options_type &opts)
Parse an ABI instrumentation file (in XML format) at a given path.
translation_unit_sptr read_translation_unit_from_buffer(const string &buffer, environment &env, const fe_iface::options_type &opts)
Parse an ABI instrumentation file (in XML format) from an in-memory buffer.
corpus_group_sptr read_corpus_group_from_abixml(std::istream *in, environment &env, const fe_iface::options_type &opts)
De-serialize an ABI corpus group from an input XML document which root node is 'abi-corpus-group'.
corpus_group_sptr read_corpus_group_from_input(fe_iface &iface)
Parse the input XML document containing an ABI corpus group, represented by an 'abi-corpus-group' ele...
reader_sptr is_reader(fe_iface_sptr iface)
Convert a abigail:fe_iface into an abigail::abixml::reader.
corpus_sptr read_corpus_from_abixml(std::istream *in, environment &env, const fe_iface::options_type &opts)
De-serialize an ABI corpus from an input XML document which root node is 'abi-corpus'.
fe_iface_sptr create_reader(const string &path, environment &env, const fe_iface::options_type &opts)
Create an abixml::reader to read a native XML ABI file.
corpus_group_sptr read_corpus_group_from_abixml_file(const string &path, environment &env, const fe_iface::options_type &opts)
De-serialize an ABI corpus group from an XML document file which root node is 'abi-corpus-group'.
void consider_types_not_reachable_from_public_interfaces(fe_iface &iface, bool flag)
Configure the reader so that types not reachable from public interface are taken into account when th...
The namespace of the internal representation of ABI artifacts like types and decls.
shared_ptr< translation_unit > translation_unit_sptr
Convenience typedef for a shared pointer on a translation_unit type.
Definition abg-fwd.h:137
Toplevel namespace for libabigail.
The generic options that control the behaviour of all Front-End interfaces.