libabigail
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-2025 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
35read_translation_unit_from_buffer(const std::string& file_path,
36 environment& env);
37
40 environment& env);
41
44
45 abigail::fe_iface_sptr
46create_reader(const string& path, environment& env);
47
48fe_iface_sptr
49create_reader(std::istream* in, environment& env);
50
51corpus_sptr
52read_corpus_from_abixml(std::istream* in,
53 environment& env);
54
55corpus_sptr
56read_corpus_from_abixml_file(const string& path,
57 environment& env);
58
59corpus_group_sptr
61
62corpus_group_sptr
63read_corpus_group_from_abixml(std::istream* in,
64 environment& env);
65
66corpus_group_sptr
67read_corpus_group_from_abixml_file(const string& path,
68 environment& env);
69
70void
72 bool flag);
73
74#ifdef WITH_SHOW_TYPE_USE_IN_ABILINT
75vector<type_base_sptr>*
76get_types_from_type_id(fe_iface&, const string&);
77
78unordered_map<type_or_decl_base*, vector<type_or_decl_base*>>*
79get_artifact_used_by_relation_map(fe_iface&);
80#endif
81}//end abixml
82
83#ifdef WITH_DEBUG_SELF_COMPARISON
84bool
85load_canonical_type_ids(fe_iface& ctxt,
86 const string& file_path);
87#endif
88}//end namespace abigail
89
90#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.
Definition: abg-fe-iface.h:29
This is an abstraction of the set of resources necessary to manage several aspects of the internal re...
Definition: abg-ir.h:148
translation_unit_sptr read_translation_unit_from_buffer(const string &buffer, environment &env)
Parse an ABI instrumentation file (in XML format) from an in-memory buffer.
Definition: abg-reader.cc:2526
translation_unit_sptr read_translation_unit(fe_iface &iface)
Parse a translation unit from an abixml input from a given context.
Definition: abg-reader.cc:2545
translation_unit_sptr read_translation_unit_from_istream(istream *in, environment &env)
De-serialize a translation unit from an ABI Instrumentation xml file coming from an input stream.
Definition: abg-reader.cc:6946
corpus_sptr read_corpus_from_abixml(std::istream *in, environment &env)
De-serialize an ABI corpus from an input XML document which root node is 'abi-corpus'.
Definition: abg-reader.cc:7019
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...
Definition: abg-reader.cc:2374
corpus_sptr read_corpus_from_abixml_file(const string &path, environment &env)
De-serialize an ABI corpus from an XML document file which root node is 'abi-corpus'.
Definition: abg-reader.cc:7041
translation_unit_sptr read_translation_unit_from_file(const string &input_file, environment &env)
Parse an ABI instrumentation file (in XML format) at a given path.
Definition: abg-reader.cc:2504
corpus_group_sptr read_corpus_group_from_abixml(std::istream *in, environment &env)
De-serialize an ABI corpus group from an input XML document which root node is 'abi-corpus-group'.
Definition: abg-reader.cc:2464
fe_iface_sptr create_reader(const string &path, environment &env)
Create an xml_reader::reader to read a native XML ABI file.
Definition: abg-reader.cc:6970
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...
Definition: abg-reader.cc:2294
corpus_group_sptr read_corpus_group_from_abixml_file(const string &path, environment &env)
De-serialize an ABI corpus group from an XML document file which root node is 'abi-corpus-group'.
Definition: abg-reader.cc:2486
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:136
Toplevel namespace for libabigail.