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-2023 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 
22 namespace abigail
23 {
24 
25 namespace abixml
26 {
27 
28 using namespace abigail::ir;
29 
31 read_translation_unit_from_file(const std::string& file_path,
32  environment& env);
33 
35 read_translation_unit_from_buffer(const std::string& file_path,
36  environment& env);
37 
39 read_translation_unit_from_istream(std::istream* in,
40  environment& env);
41 
43 read_translation_unit(fe_iface&);
44 
45  abigail::fe_iface_sptr
46 create_reader(const string& path, environment& env);
47 
48 fe_iface_sptr
49 create_reader(std::istream* in, environment& env);
50 
51 corpus_sptr
52 read_corpus_from_abixml(std::istream* in,
53  environment& env);
54 
55 corpus_sptr
56 read_corpus_from_abixml_file(const string& path,
57  environment& env);
58 
59 corpus_group_sptr
60 read_corpus_group_from_input(fe_iface& ctxt);
61 
62 corpus_group_sptr
63 read_corpus_group_from_abixml(std::istream* in,
64  environment& env);
65 
66 corpus_group_sptr
67 read_corpus_group_from_abixml_file(const string& path,
68  environment& env);
69 
70 void
72  bool flag);
73 
74 #ifdef WITH_SHOW_TYPE_USE_IN_ABILINT
75 vector<type_base_sptr>*
76 get_types_from_type_id(fe_iface&, const string&);
77 
78 unordered_map<type_or_decl_base*, vector<type_or_decl_base*>>*
79 get_artifact_used_by_relation_map(fe_iface&);
80 #endif
81 }//end abixml
82 
83 #ifdef WITH_DEBUG_SELF_COMPARISON
84 bool
85 load_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".
This is an abstraction of the set of resources necessary to manage several aspects of the internal re...
Definition: abg-ir.h:140
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:2418
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:6658
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:2377
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:2272
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:6680
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:2399
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:2337
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:6609
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:6585
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:2192
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:2359
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:134
Toplevel namespace for libabigail.