libabigail
abg-fwd.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 /// @file
7 
8 #ifndef __ABG_IRFWD_H__
9 #define __ABG_IRFWD_H__
10 
11 #include <stdint.h>
12 #include <cstddef>
13 #include <cstdlib>
14 #include <regex.h>
15 #include <list>
16 #include <memory>
17 #include <ostream>
18 #include <string>
19 #include <typeinfo>
20 #include <unordered_map>
21 #include <unordered_set>
22 #include <utility> // for std::rel_ops, at least.
23 #include <vector>
24 #include "abg-interned-str.h"
25 #include "abg-hash.h"
26 
27 /// Toplevel namespace for libabigail.
28 namespace abigail
29 {
30 /**
31  @mainpage libabigail
32 
33  This is the API documentation of the Application Binary
34  Interface Generic Analysis and Instrumentation Library, aka,
35  <em>libabigail</em>.
36 
37  Check out <a href="http://sourceware.org/libabigail"> the project
38  homepage</a>!
39 
40  The current libabigail source code can be browsed at
41  http://sourceware.org/git/gitweb.cgi?p=libabigail.git
42 
43  It can be checked out with:
44  <em>git clone git://sourceware.org/git/libabigail.git</em>
45 
46  The mailing list to send messages and patches to is
47  libabigail@sourceware.org.
48 
49  You can hang out with libabigail developers and users on irc at
50  irc://irc.oftc.net\#libabigail.
51 */
52 
53 // Inject some types.
54 using std::shared_ptr;
55 using std::weak_ptr;
56 using std::unordered_map;
57 using std::string;
58 using std::vector;
59 using std::unordered_set;
60 
61 typedef unordered_set<string> string_set_type;
62 
63 // Pull in relational operators.
64 using namespace std::rel_ops;
65 
66 namespace comparison
67 {
68 class diff_context;
69 
70 /// Convenience typedef for a shared pointer of @ref diff_context.
71 typedef shared_ptr<diff_context> diff_context_sptr;
72 
73 /// Convenience typedef for a weak pointer of @ref diff_context.
74 typedef weak_ptr<diff_context> diff_context_wptr;
75 
76 class diff;
77 
78 /// Convenience typedef for a shared_ptr for the @ref diff class
79 typedef shared_ptr<diff> diff_sptr;
80 
81 /// Convenience typedef for a weak_ptr for the @ref diff class
82 typedef weak_ptr<diff> diff_wptr;
83 }
84 
85 namespace regex
86 {
87 /// A convenience typedef for a shared pointer of regex_t.
88 typedef std::shared_ptr<regex_t> regex_t_sptr;
89 }// end namespace regex
90 
91 namespace ir
92 {
93 
94 // Forward declarations for corpus.
95 
96 class corpus;
97 typedef shared_ptr<corpus> corpus_sptr;
98 
99 class corpus_group;
100 typedef shared_ptr<corpus_group> corpus_group_sptr;
101 
102 // Forward declarations for ir.
103 
104 class ir_node_visitor;
105 
106 struct ir_traversable_base;
107 
108 /// Convenience typedef for a shared pointer to @ref
109 /// ir_traversable_base.
110 typedef shared_ptr<ir_traversable_base> ir_traversable_base_sptr;
111 
112 class environment;
113 /// Convenience typedef for a shared pointer to an @ref environment
114 typedef shared_ptr<environment> environment_sptr;
115 
116 class location;
117 class location_manager;
118 
119 class type_or_decl_base;
120 /// A convenience typedef for a shared_ptr to @ref type_or_decl_base.
121 typedef shared_ptr<type_or_decl_base> type_or_decl_base_sptr;
122 
123 class type_base;
124 
125 // Convenience typedef for a shared pointer on a @ref type_base
126 typedef shared_ptr<type_base> type_base_sptr;
127 
128 /// Convenience typedef for a weak pointer on a @ref type_base
129 typedef weak_ptr<type_base> type_base_wptr;
130 
131 /// Convenience typedef for a weak pointer to a @ref corpus.
132 typedef weak_ptr<corpus> corpus_wptr;
133 
134 class translation_unit;
135 /// Convenience typedef for a shared pointer on a @ref
136 /// translation_unit type.
137 typedef shared_ptr<translation_unit> translation_unit_sptr;
138 /// Convenience typedef for a map that associates a string to a
139 /// translation unit.
140 typedef unordered_map<string, translation_unit_sptr> string_tu_map_type;
141 
142 /// A convenience typedef for a vector of type_base_wptr.
143 typedef vector<type_base_wptr> type_base_wptrs_type;
144 
145 /// A convenience typedef for a map which key is an interned_string
146 /// and which value is a vector of type_base_wptr.
147 typedef unordered_map<interned_string,
150 
151 class decl_base;
152 
153 // Convenience typedef for a smart pointer on @ref decl_base.
154 typedef shared_ptr<decl_base> decl_base_sptr;
155 
156 /// Convenience typedef for a map which key is a string and which
157 /// value is a @ref decl_base_sptr.
158 typedef unordered_map<string, decl_base_sptr> string_decl_base_sptr_map;
159 
160 class type_decl;
161 /// Convenience typedef for a shared pointer on a @ref type_decl.
162 typedef shared_ptr<type_decl> type_decl_sptr;
163 
164 
165 class typedef_decl;
166 
167 /// Convenience typedef for a shared pointer on a @ref typedef_decl.
168 typedef shared_ptr<typedef_decl> typedef_decl_sptr;
169 
170 /// Convenience typedef for a weak pointer on a @ref typedef_decl.
171 typedef weak_ptr<typedef_decl> typedef_decl_wptr;
172 
173 class enum_type_decl;
174 
175 /// Convenience typedef for shared pointer to a @ref enum_type_decl.
176 typedef shared_ptr<enum_type_decl> enum_type_decl_sptr;
177 
178 /// Convenience typedef for a vector of @ref enum_type_decl_sptr
179 typedef vector<enum_type_decl_sptr> enums_type;
180 
181 /// Convenience typedef for a weak pointer to a @ref decl_base.
182 typedef weak_ptr<decl_base> decl_base_wptr;
183 
184 class class_or_union;
185 
186 typedef shared_ptr<class_or_union> class_or_union_sptr;
187 typedef weak_ptr<class_or_union> class_or_union_wptr;
188 
189 class scope_type_decl;
190 
191 class class_decl;
192 
193 /// Convenience typedef for a shared pointer on a @ref class_decl
194 typedef shared_ptr<class_decl> class_decl_sptr;
195 
196 /// Convenience typedef for a vector of @ref class_decl_sptr
197 typedef vector<class_decl_sptr> classes_type;
198 
199 /// Convenience typedef for a vector of @ref class_or_union_sptr
200 typedef vector<class_or_union_sptr> classes_or_unions_type;
201 
202 /// Convenience typedef for a weak pointer on a @ref class_decl.
203 typedef weak_ptr<class_decl> class_decl_wptr;
204 
205 class union_decl;
206 
207 typedef shared_ptr<union_decl> union_decl_sptr;
208 
209 class function_type;
210 /// Convenience typedef for a shared pointer on a @ref function_type
211 typedef shared_ptr<function_type> function_type_sptr;
212 
213 /// Convenience typedef fo a vector of @ref function_type_sptr
214 typedef vector<function_type_sptr> function_types_type;
215 
216 /// Convenience typedef for a weak pointer on a @ref function_type
217 typedef weak_ptr<function_type> function_type_wptr;
218 
219 class method_type;
220 
221 /// Convenience typedef for shared pointer to @ref method_type.
222 typedef shared_ptr<method_type> method_type_sptr;
223 
224 class pointer_type_def;
225 
226 /// Convenience typedef for a shared pointer on a @ref pointer_type_def
227 typedef shared_ptr<pointer_type_def> pointer_type_def_sptr;
228 
229 class qualified_type_def;
230 
231 typedef shared_ptr<qualified_type_def> qualified_type_def_sptr;
232 
233 class reference_type_def;
234 
235 /// Convenience typedef for a shared pointer on a @ref reference_type_def
236 typedef shared_ptr<reference_type_def> reference_type_def_sptr;
237 
238 class ptr_to_mbr_type;
239 /// Convenience typedef for a shared pointer to a @ref ptr_to_mbr_type
240 typedef shared_ptr<ptr_to_mbr_type> ptr_to_mbr_type_sptr;
241 
242 class array_type_def;
243 
244 /// Convenience typedef for a shared pointer on a @ref array_type_def
245 typedef shared_ptr<array_type_def> array_type_def_sptr;
246 
247 class subrange_type;
248 
249 class dm_context_rel;
250 
251 /// A convenience typedef for a shared pointer to dm_context_rel.
252 typedef shared_ptr<dm_context_rel> dm_context_rel_sptr;
253 
254 class var_decl;
255 
256 /// Convenience typedef for a shared pointer on a @ref var_decl
257 typedef shared_ptr<var_decl> var_decl_sptr;
258 
259 /// Convenience typedef for a weak pointer on a @ref var_decl
260 typedef weak_ptr<var_decl> var_decl_wptr;
261 
262 class scope_decl;
263 
264 /// Convenience typedef for a shared pointer on a @ref scope_decl.
265 typedef shared_ptr<scope_decl> scope_decl_sptr;
266 
267 class function_decl;
268 
269 /// Convenience typedef for a shared pointer on a @ref function_decl
270 typedef shared_ptr<function_decl> function_decl_sptr;
271 
272 class method_decl;
273 
274 typedef shared_ptr<method_decl> method_decl_sptr;
275 
276 class mem_fn_context_rel;
277 
278 /// A convenience typedef for a shared pointer to @ref
279 /// mem_fn_context_rel.
280 typedef shared_ptr<mem_fn_context_rel> mem_fn_context_rel_sptr;
281 
282 class namespace_decl;
283 
284 /// Convenience typedef for a shared pointer on namespace_decl.
285 typedef shared_ptr<namespace_decl> namespace_decl_sptr;
286 
287 class class_tdecl;
288 
289 /// Convenience typedef for a shared pointer on a @ref class_tdecl
290 typedef shared_ptr<class_tdecl> class_tdecl_sptr;
291 
292 class function_tdecl;
293 
294 /// Convenience typedef for a shared pointer on a @ref function_tdecl
295 typedef shared_ptr<function_tdecl> function_tdecl_sptr;
296 
297 class global_scope;
298 
299 /// Convenience typedef for shared pointer on @ref global_scope.
300 typedef shared_ptr<global_scope> global_scope_sptr;
301 
302 class node_visitor;
303 
304 class template_decl;
305 
306 /// Convenience typedef for a shared pointer to @ref template_decl
307 typedef shared_ptr<template_decl> template_decl_sptr;
308 
309 /// Convenience typedef for a weak pointer to template_decl
310 typedef weak_ptr<template_decl> template_decl_wptr;
311 
312 class template_parameter;
313 
314 /// Convenience typedef for shared pointer to template parameter
315 typedef shared_ptr<template_parameter> template_parameter_sptr;
316 
317 class non_type_tparameter;
318 
319 /// Convenience typedef for shared pointer to @ref
320 /// non_type_template_parameter
321 typedef shared_ptr<non_type_tparameter> non_type_tparameter_sptr;
322 
323 class type_tparameter;
324 
325 class template_tparameter;
326 
327 /// Convenience typedef for a shared_ptr to @ref template_tparameter.
328 typedef shared_ptr<template_tparameter> template_tparameter_sptr;
329 
330 /// Convenience typedef for a shared pointer to @ref type_tparameter.
331 typedef shared_ptr<type_tparameter> type_tparameter_sptr;
332 
333 class type_composition;
334 
336 typedef shared_ptr<member_function_template> member_function_template_sptr;
337 typedef vector<member_function_template_sptr> member_function_templates;
338 
340 typedef shared_ptr<member_class_template> member_class_template_sptr;
341 typedef vector<member_class_template_sptr> member_class_templates;
342 
343 /// Convenience typedef for shared pointer to type_composition
344 typedef shared_ptr<type_composition> type_composition_sptr;
345 
346 decl_base_sptr
347 add_decl_to_scope(decl_base_sptr, scope_decl*);
348 
349 decl_base_sptr
350 add_decl_to_scope(decl_base_sptr, const scope_decl_sptr&);
351 
352 const global_scope*
354 
355 const global_scope*
357 
358 const global_scope*
359 get_global_scope(const decl_base_sptr);
360 
363 
366 
368 get_translation_unit(const decl_base_sptr);
369 
370 bool
372 
373 const global_scope*
375 
376 bool
378 
379 bool
381 
382 bool
383 is_at_global_scope(const decl_base_sptr);
384 
385 bool
387 
389 is_at_class_scope(const decl_base_sptr);
390 
393 
396 
397 bool
398 is_at_template_scope(const decl_base_sptr);
399 
400 bool
401 is_template_parameter(const decl_base_sptr);
402 
405 
408 
409 bool
411 
412 decl_base*
413 is_decl(const type_or_decl_base*);
414 
415 decl_base_sptr
417 
418 decl_base*
420 
421 decl_base_sptr
423 
424 bool
425 is_type(const type_or_decl_base&);
426 
427 type_base*
428 is_type(const type_or_decl_base*);
429 
430 type_base_sptr
431 is_type(const type_or_decl_base_sptr& tod);
432 
433 bool
435 
436 bool
437 is_anonymous_type(const type_base_sptr&);
438 
439 bool
440 is_npaf_type(const type_base_sptr&);
441 
442 const type_decl*
444 
447 
448 type_decl*
450 
453 
456 
457 const typedef_decl*
459 
460 const typedef_decl*
461 is_typedef(const type_base*);
462 
465 
467 is_compatible_with_enum_type(const type_base_sptr&);
468 
470 is_compatible_with_enum_type(const decl_base_sptr&);
471 
474 
475 const enum_type_decl*
477 
478 bool
480 
481 class_decl*
483 
486 
489 
492 
495 
498 
501 
504 
505 bool
507  bool look_through_decl_only = false);
508 
509 bool
510 is_declaration_only_class_or_union_type(const type_base_sptr& t,
511  bool look_through_decl_only = false);
512 
515 
516 class_or_union_sptr
518 
519 bool
521  const class_or_union*);
522 
523 bool
524 class_or_union_types_of_same_kind(const class_or_union_sptr&,
525  const class_or_union_sptr&);
526 
527 bool
529 
530 union_decl*
532 
533 union_decl_sptr
535 
537 is_compatible_with_class_type(const type_base_sptr&);
538 
540 is_compatible_with_class_type(const decl_base_sptr&);
541 
542 const pointer_type_def*
544  bool look_through_qualifiers=false);
545 
548  bool look_through_qualifiers=false);
549 
551 is_pointer_to_function_type(const type_base_sptr&);
552 
554 is_pointer_to_array_type(const type_base_sptr&);
555 
557 is_pointer_to_ptr_to_mbr_type(const type_base_sptr&);
558 
560 is_pointer_to_npaf_type(const type_base_sptr&);
561 
562 bool
564 
565 bool
567 
568 bool
570 
572 is_reference_type(type_or_decl_base*, bool look_through_qualifiers=false);
573 
574 const reference_type_def*
575 is_reference_type(const type_or_decl_base*, bool look_through_qualifiers=false);
576 
579  bool look_through_qualifiers=false);
580 
581 const ptr_to_mbr_type*
583  bool look_through_qualifiers=false);
584 
587  bool look_through_qualifiers=false);
588 
589 const type_base*
591 
592 const type_base_sptr
593 is_void_pointer_type(const type_base_sptr&);
594 
595 const type_base*
597 
598 const type_base*
600 
603 
604 qualified_type_def_sptr
606 
607 bool
608 is_const_qualified_type(const type_base_sptr& t);
609 
610 bool
611 is_const_qualified_type(const qualified_type_def_sptr&);
612 
613 type_base_sptr
614 peel_const_qualified_type(const qualified_type_def_sptr&);
615 
618 
621 
622 const function_type*
624 
627 
628 const method_type*
630 
633 
634 class_or_union_sptr
636 
637 class_or_union_sptr
638 look_through_decl_only_class(class_or_union_sptr);
639 
642 
645 
648 
649 decl_base_sptr
651 
652 decl_base*
654 
655 decl_base_sptr
656 look_through_decl_only(const decl_base_sptr&);
657 
658 var_decl*
660 
663 
665 is_namespace(const decl_base_sptr&);
666 
668 is_namespace(const decl_base*);
669 
670 bool
671 is_template_parm_composition_type(const decl_base_sptr);
672 
673 bool
674 is_template_decl(const decl_base_sptr);
675 
676 bool
677 is_function_template_pattern(const decl_base_sptr);
678 
679 
680 decl_base_sptr
681 insert_decl_into_scope(decl_base_sptr,
682  vector<decl_base_sptr >::iterator,
683  scope_decl*);
684 
685 decl_base_sptr
686 insert_decl_into_scope(decl_base_sptr,
687  vector<decl_base_sptr >::iterator,
689 
690 bool
691 has_scope(const decl_base&);
692 
693 bool
694 has_scope(const decl_base_sptr);
695 
696 bool
697 is_member_decl(const decl_base_sptr);
698 
699 bool
700 is_member_decl(const decl_base*);
701 
702 bool
703 is_member_decl(const decl_base&);
704 
705 scope_decl*
707 
709 is_scope_decl(const decl_base_sptr&);
710 
711 bool
712 is_member_type(const type_base_sptr&);
713 
714 bool
716 
717 bool
718 is_user_defined_type(const type_base_sptr&);
719 
720 void
721 remove_decl_from_scope(decl_base_sptr);
722 
723 bool
725 
726 bool
728 
729 bool
730 get_member_is_static(const decl_base_sptr&);
731 
732 void
734 
735 void
736 set_member_is_static(const decl_base_sptr&, bool);
737 
738 bool
739 is_data_member(const var_decl&);
740 
741 var_decl*
743 
744 bool
745 is_data_member(const var_decl*);
746 
749 
750 bool
752 
754 is_data_member(const decl_base_sptr&);
755 
756 var_decl*
757 is_data_member(const decl_base *);
758 
759 var_decl*
760 is_data_member(const decl_base *);
761 
762 const var_decl_sptr
763 get_next_data_member(const class_or_union_sptr&, const var_decl_sptr&);
764 
767 
770 
772 get_last_data_member(const class_or_union_sptr&);
773 
774 bool
776 
777 bool
778 collect_non_anonymous_data_members(const class_or_union_sptr &cou, string_decl_base_sptr_map& dms);
779 
780 bool
782 
783 const var_decl*
785 
786 const var_decl*
788 
791 
793 is_anonymous_data_member(const decl_base_sptr&);
794 
797 
798 const var_decl*
800 
801 bool
803 
804 bool
806 
807 bool
809 
810 bool
812 
813 const var_decl_sptr
815 
818  const string&);
819 
822 
823 class_or_union_sptr
825 
826 class_or_union_sptr
828 
829 bool
831  const class_or_union& clazz);
832 
833 bool
835 
836 const class_or_union_sptr
838 
839 const class_or_union_sptr
841 
842 const class_or_union_sptr
844 
846 is_array_type(const type_or_decl_base* decl,
847  bool look_through_qualifiers = false);
848 
851  bool look_through_qualifiers = false);
852 
854 is_array_of_qualified_element(const type_base_sptr&);
855 
856 qualified_type_def_sptr
858 
860 is_typedef_of_array(const type_base_sptr&);
861 
862 void
864 
865 uint64_t
867 
868 uint64_t
870 
871 uint64_t
872 get_data_member_offset(const decl_base_sptr);
873 
874 uint64_t
876 
877 bool
879  const var_decl_sptr&,
880  uint64_t&);
881 
882 bool
883 get_next_data_member_offset(const class_or_union_sptr&,
884  const var_decl_sptr&,
885  uint64_t&);
886 
887 uint64_t
889 
890 void
892 
893 bool
895 
896 bool
898 
899 bool
901 
902 bool
904 
905 bool
907 
908 bool
910 
911 bool
913 
914 void
916 
917 void
919 
920 bool
922 
923 bool
925 
926 void
928 
929 void
931 
932 bool
934 
935 bool
937 
938 void
940 
941 void
943 
944 bool
946 
947 ssize_t
949 
950 ssize_t
952 
953 void
955  ssize_t s);
956 
957 void
959  ssize_t s);
960 
961 bool
963 
964 bool
966 
967 bool
969 
970 void
972 
973 void
975 
976 type_base_sptr
977 strip_typedef(const type_base_sptr);
978 
979 decl_base_sptr
980 strip_useless_const_qualification(const qualified_type_def_sptr t);
981 
982 void
983 strip_redundant_quals_from_underyling_types(const qualified_type_def_sptr&);
984 
985 type_base_sptr
986 peel_typedef_type(const type_base_sptr&);
987 
988 const type_base*
990 
991 type_base_sptr
992 peel_pointer_type(const type_base_sptr&);
993 
994 const type_base*
996 
997 type_base_sptr
998 peel_reference_type(const type_base_sptr&);
999 
1000 const type_base*
1002 
1003 const type_base_sptr
1004 peel_array_type(const type_base_sptr&);
1005 
1006 const type_base*
1007 peel_array_type(const type_base*);
1008 
1009 const type_base*
1011 
1012 const type_base_sptr
1013 peel_qualified_type(const type_base_sptr&);
1014 
1015 type_base*
1017 
1018 type_base_sptr
1019 peel_qualified_or_typedef_type(const type_base_sptr &type);
1020 
1021 type_base_sptr
1022 peel_typedef_pointer_or_reference_type(const type_base_sptr);
1023 
1024 type_base*
1026 
1027 type_base*
1029  bool peel_qual_type);
1030 
1031 type_base*
1033  bool peel_qualified_type = true);
1034 
1036 clone_array(const array_type_def_sptr& array);
1037 
1040 
1041 qualified_type_def_sptr
1042 clone_qualified_type(const qualified_type_def_sptr& t);
1043 
1044 type_base_sptr
1045 clone_array_tree(const type_base_sptr t);
1046 
1047 string
1048 get_name(const type_or_decl_base*, bool qualified = true);
1049 
1050 string
1052  bool qualified = true);
1053 
1054 location
1055 get_location(const type_base_sptr& type);
1056 
1057 location
1058 get_location(const decl_base_sptr& decl);
1059 
1060 string
1061 build_qualified_name(const scope_decl* scope, const string& name);
1062 
1063 string
1064 build_qualified_name(const scope_decl* scope,
1065  const type_base_sptr& type);
1066 
1067 scope_decl*
1069 
1070 scope_decl*
1071 get_type_scope(const type_base_sptr&);
1072 
1074 get_type_name(const type_base_sptr&,
1075  bool qualified = true,
1076  bool internal = false);
1077 
1079 get_type_name(const type_base*,
1080  bool qualified = true,
1081  bool internal = false);
1082 
1084 get_type_name(const type_base&,
1085  bool qualified = true,
1086  bool internal = false);
1087 
1089 get_name_of_pointer_to_type(const type_base& pointed_to_type,
1090  bool qualified = true,
1091  bool internal = false);
1092 
1094 get_name_of_reference_to_type(const type_base& pointed_to_type,
1095  bool lvalue_reference = false,
1096  bool qualified = true,
1097  bool internal = false);
1098 
1101  bool internal = false);
1102 
1104 get_function_type_name(const function_type*, bool internal = false);
1105 
1107 get_function_type_name(const function_type&, bool internal = false);
1108 
1111 
1113 get_method_type_name(const method_type_sptr&, bool internal = false);
1114 
1116 get_method_type_name(const method_type*, bool internal = false);
1117 
1119 get_method_type_name(const method_type&, bool internal = false);
1120 
1121 string
1122 get_pretty_representation(const decl_base*, bool internal = false);
1123 
1124 string
1125 get_pretty_representation(const type_base*, bool internal = false);
1126 
1127 string
1128 get_pretty_representation(const type_or_decl_base*, bool internal = false);
1129 
1130 string
1132  bool internal = false);
1133 
1134 string
1135 get_pretty_representation(const decl_base_sptr&, bool internal = false);
1136 
1137 string
1138 get_pretty_representation(const type_base_sptr&, bool internal = false);
1139 
1140 string
1141 get_pretty_representation(const function_type&, bool internal = false);
1142 
1143 string
1144 get_pretty_representation(const function_type*, bool internal = false);
1145 
1146 string
1148  bool internal = false);
1149 
1150 string
1151 get_pretty_representation(const method_type&, bool internal = false);
1152 
1153 string
1154 get_pretty_representation(const method_type*, bool internal = false);
1155 
1156 string
1158  bool internal = false);
1159 
1160 string
1162  const string& indent,
1163  bool one_line,
1164  bool internal,
1165  bool qualified_name = true);
1166 
1167 string
1169  const string& indent,
1170  bool one_line,
1171  bool internal,
1172  bool qualified_name = true);
1173 
1174 string
1175 get_class_or_union_flat_representation(const class_or_union_sptr& cou,
1176  const string& indent,
1177  bool one_line,
1178  bool internal,
1179  bool qualified_name = true);
1180 
1181 string
1183  const string& indent,
1184  bool one_line,
1185  bool internal,
1186  bool qualified_names);
1187 
1188 string
1190  const string& indent,
1191  bool one_line,
1192  bool internal,
1193  bool qualified_names);
1194 
1195 string
1197  const string& indent,
1198  bool one_line,
1199  bool qualified_names);
1200 
1201 string
1203  const string& indent,
1204  bool one_line,
1205  bool internal,
1206  bool qualified_name);
1207 
1208 string
1210 
1212 get_data_member(class_or_union *, const char*);
1213 
1215 get_data_member(type_base *clazz, const char* member_name);
1216 
1217 const location&
1219 
1220 const location&
1222 
1224 debug(const type_or_decl_base* artifact);
1225 
1226 type_base*
1227 debug(const type_base* artifact);
1228 
1229 decl_base*
1230 debug(const decl_base* artifact);
1231 
1232 bool
1234 
1235 void
1236 debug_comp_stack(const environment& env);
1237 
1238 bool
1240 
1241 const decl_base*
1243 
1244 decl_base*
1246 
1247 decl_base_sptr
1248 get_type_declaration(const type_base_sptr);
1249 
1250 bool
1251 types_are_compatible(const type_base_sptr,
1252  const type_base_sptr);
1253 
1254 bool
1255 types_are_compatible(const decl_base_sptr,
1256  const decl_base_sptr);
1257 
1258 const scope_decl*
1260  const scope_decl*);
1261 
1262 const scope_decl*
1263 get_top_most_scope_under(const decl_base_sptr,
1264  const scope_decl*);
1265 
1266 const scope_decl*
1267 get_top_most_scope_under(const decl_base_sptr,
1268  const scope_decl_sptr);
1269 
1270 void
1271 fqn_to_components(const std::string&,
1272  std::list<string>&);
1273 
1274 string
1275 components_to_type_name(const std::list<string>&);
1276 
1279 
1282 
1284 lookup_basic_type(const string&, const translation_unit&);
1285 
1287 lookup_basic_type(const type_decl&, const corpus&);
1288 
1290 lookup_basic_type(const string&, const corpus&);
1291 
1293 lookup_basic_type(const interned_string&, const corpus&);
1294 
1297 
1299 lookup_basic_type_per_location(const string&, const corpus&);
1300 
1303 
1306 
1308 lookup_class_type(const string&, const translation_unit&);
1309 
1311 lookup_class_type(const class_decl&, const corpus&);
1312 
1314 lookup_class_type(const interned_string&, const corpus&);
1315 
1316 const type_base_wptrs_type*
1317 lookup_class_types(const interned_string&, const corpus&);
1318 
1319 const type_base_wptrs_type*
1320 lookup_union_types(const interned_string&, const corpus&);
1321 
1322 bool
1324  const corpus&,
1326 
1327 const type_base_wptrs_type*
1328 lookup_class_types(const string&, const corpus&);
1329 
1330 const type_base_wptrs_type*
1331 lookup_union_types(const string&, const corpus&);
1332 
1335 
1337 lookup_class_type_per_location(const string&, const corpus&);
1338 
1340 lookup_class_type(const string&, const corpus&);
1341 
1343 lookup_class_type_through_scopes(const std::list<string>&,
1344  const translation_unit&);
1345 
1346 union_decl_sptr
1348 
1349 union_decl_sptr
1350 lookup_union_type(const interned_string&, const corpus&);
1351 
1352 union_decl_sptr
1354 
1355 union_decl_sptr
1356 lookup_union_type_per_location(const string&, const corpus&);
1357 
1358 union_decl_sptr
1359 lookup_union_type(const string&, const corpus&);
1360 
1363 
1365 lookup_enum_type(const string&, const translation_unit&);
1366 
1368 lookup_enum_type(const enum_type_decl&, const corpus&);
1369 
1371 lookup_enum_type(const string&, const corpus&);
1372 
1374 lookup_enum_type(const interned_string&, const corpus&);
1375 
1376 const type_base_wptrs_type*
1377 lookup_enum_types(const interned_string&, const corpus&);
1378 
1379 const type_base_wptrs_type*
1380 lookup_enum_types(const string&, const corpus&);
1381 
1384 
1386 lookup_enum_type_per_location(const string&, const corpus&);
1387 
1390 
1392 lookup_typedef_type(const typedef_decl&, const corpus&);
1393 
1395 lookup_typedef_type(const interned_string& type_name,
1396  const translation_unit& tu);
1397 
1399 lookup_typedef_type(const string& type_name, const translation_unit& tu);
1400 
1403 
1406 
1408 lookup_typedef_type_per_location(const string&, const corpus &);
1409 
1411 lookup_typedef_type(const string&, const corpus&);
1412 
1413 type_base_sptr
1414 lookup_class_or_typedef_type(const string&, const translation_unit&);
1415 
1416 type_base_sptr
1418 
1419 type_base_sptr
1420 lookup_class_or_typedef_type(const string&, const corpus&);
1421 
1422 type_base_sptr
1423 lookup_class_typedef_or_enum_type(const string&, const corpus&);
1424 
1425 qualified_type_def_sptr
1427 
1428 qualified_type_def_sptr
1429 lookup_qualified_type(const string&, const translation_unit&);
1430 
1431 qualified_type_def_sptr
1433 
1434 qualified_type_def_sptr
1436 
1439 
1441 lookup_pointer_type(const string&, const translation_unit&);
1442 
1444 lookup_pointer_type(const type_base_sptr& pointed_to_type,
1445  const translation_unit& tu);
1446 
1449 
1452 
1455 
1457 lookup_reference_type(const string&, const translation_unit&);
1458 
1460 lookup_reference_type(const type_base_sptr& pointed_to_type,
1461  bool lvalue_reference,
1462  const translation_unit& tu);
1463 
1466 
1469 
1472 
1474 lookup_array_type(const string&, const translation_unit&);
1475 
1477 lookup_array_type(const array_type_def&, const corpus&);
1478 
1480 lookup_array_type(const interned_string&, const corpus&);
1481 
1483 lookup_function_type(const string&,
1484  const translation_unit&);
1485 
1488  const translation_unit&);
1489 
1492  const translation_unit&);
1493 
1496  const translation_unit&);
1497 
1499 lookup_function_type(const function_type&, const corpus&);
1500 
1503 
1505 lookup_function_type(const function_type&, const corpus&);
1506 
1509 
1510 type_base_sptr
1511 lookup_type(const string&, const translation_unit&);
1512 
1513 const type_base_sptr
1514 lookup_type(const type_base_sptr, const translation_unit&);
1515 
1516 type_base_sptr
1517 lookup_type(const interned_string&, const corpus&);
1518 
1519 type_base_sptr
1521 
1522 type_base_sptr
1523 lookup_type(const type_base&, const corpus&);
1524 
1525 type_base_sptr
1526 lookup_type(const type_base_sptr&, const corpus&);
1527 
1528 type_base_sptr
1529 lookup_type_through_scopes(const std::list<string>&,
1530  const translation_unit&);
1531 
1532 type_base_sptr
1533 lookup_type_through_translation_units(const string&, const corpus&);
1534 
1535 type_base_sptr
1536 lookup_type_from_translation_unit(const string& type_name,
1537  const string& tu_path,
1538  const corpus& corp);
1539 
1542  const corpus&);
1543 
1544 type_base_sptr
1545 synthesize_type_from_translation_unit(const type_base_sptr&,
1546  translation_unit&);
1547 
1550  translation_unit&);
1551 
1552 const type_base_sptr
1553 lookup_type_in_scope(const string&,
1554  const scope_decl_sptr&);
1555 
1556 const type_base_sptr
1557 lookup_type_in_scope(const std::list<string>&,
1558  const scope_decl_sptr&);
1559 
1560 const decl_base_sptr
1561 lookup_var_decl_in_scope(const string&,
1562  const scope_decl_sptr&);
1563 
1564 const decl_base_sptr
1565 lookup_var_decl_in_scope(const std::list<string>&,
1566  const scope_decl_sptr&);
1567 
1568 string
1569 demangle_cplus_mangled_name(const string&);
1570 
1571 type_base_sptr
1572 type_or_void(const type_base_sptr, const environment&);
1573 
1574 type_base_sptr
1575 canonicalize(type_base_sptr);
1576 
1577 type_base*
1578 type_has_non_canonicalized_subtype(type_base_sptr t);
1579 
1580 bool
1581 type_has_sub_type_changes(type_base_sptr t_v1,
1582  type_base_sptr t_v2);
1583 
1584 void
1585 keep_type_alive(type_base_sptr t);
1586 
1587 size_t
1588 hash_type(const type_base *t);
1589 
1590 size_t
1592 
1593 size_t
1595 
1596 bool
1598 
1599 bool
1600 is_non_canonicalized_type(const type_base_sptr&);
1601 
1602 bool
1603 is_unique_type(const type_base_sptr&);
1604 
1605 bool
1606 is_unique_type(const type_base*);
1607 
1608 /// For a given type, return its exemplar type.
1609 ///
1610 /// For a given type, its exemplar type is either its canonical type
1611 /// or the canonical type of the definition type of a given
1612 /// declaration-only type. If the neither of those two types exist,
1613 /// then the exemplar type is the given type itself.
1614 ///
1615 /// @param type the input to consider.
1616 ///
1617 /// @return the exemplar type.
1618 type_base*
1619 get_exemplar_type(const type_base* type);
1620 
1621 bool
1623 
1624 bool
1625 types_have_similar_structure(const type_base_sptr& first,
1626  const type_base_sptr& second,
1627  bool indirect_type = false);
1628 
1629 bool
1631  const type_base* second,
1632  bool indirect_type = false);
1633 
1634 string
1636  bool is_anonymous,
1637  uint64_t size);
1638 
1641  const regex::regex_t_sptr& r);
1642 
1645  const regex::regex_t_sptr& regex);
1646 } // end namespace ir
1647 
1648 using namespace abigail::ir;
1649 
1650 namespace suppr
1651 {
1652 class suppression_base;
1653 
1654 /// Convenience typedef for a shared pointer to a @ref suppression.
1655 typedef shared_ptr<suppression_base> suppression_sptr;
1656 
1657 /// Convenience typedef for a vector of @ref suppression_sptr
1658 typedef vector<suppression_sptr> suppressions_type;
1659 
1660 } // end namespace suppr
1661 
1662 namespace symtab_reader
1663 {
1664 
1665 class symtab;
1666 /// Convenience typedef for a shared pointer to a @ref symtab
1667 typedef std::shared_ptr<symtab> symtab_sptr;
1668 
1669 } // end namespace symtab_reader
1670 
1671 void
1672 dump(const decl_base_sptr, std::ostream&);
1673 
1674 void
1675 dump(const decl_base_sptr);
1676 
1677 void
1678 dump(const type_base_sptr, std::ostream&);
1679 
1680 void
1681 dump(const type_base_sptr);
1682 
1683 void
1684 dump(const var_decl_sptr, std::ostream&);
1685 
1686 void
1687 dump(const var_decl_sptr);
1688 
1689 void
1690 dump(const translation_unit&, std::ostream&);
1691 
1692 void
1693 dump(const translation_unit&);
1694 
1695 void
1696 dump(const translation_unit_sptr, std::ostream&);
1697 
1698 void
1700 
1701 void
1703 
1704 void
1706 
1707 void
1708 dump_decl_location(const decl_base_sptr&);
1709 
1710 #ifndef ABG_ASSERT
1711 /// This is a wrapper around the 'assert' glibc call. It allows for
1712 /// its argument to have side effects, so that it keeps working when
1713 /// the code of libabigail is compiled with the NDEBUG macro defined.
1714 #define ABG_ASSERT(cond) do {({bool __abg_cond__ = bool(cond); assert(__abg_cond__); !!__abg_cond__;});} while (false)
1715 #endif
1716 
1717 } // end namespace abigail
1718 #endif // __ABG_IRFWD_H__
std::shared_ptr< symtab > symtab_sptr
Convenience typedef for a shared pointer to a symtab.
Definition: abg-fwd.h:1665
Declaration of types pertaining to the interned string pool used throughout Libabigail,...
The abstraction of a change between two ABI artifacts, a.k.a an artifact change.
The abstraction of an interned string.
The abstraction of an array type.
Definition: abg-ir.h:2519
Abstracts a class declaration.
Definition: abg-ir.h:4231
The base type of class_decl and union_decl.
Definition: abg-ir.h:4029
Abstract a class template.
Definition: abg-ir.h:3832
Abstraction of a group of corpora.
Definition: abg-corpus.h:383
This is the abstraction of a set of translation units (themselves seen as bundles of unitary abi arte...
Definition: abg-corpus.h:25
The base type of all declarations.
Definition: abg-ir.h:1538
The abstraction for a data member context relationship. This relates a data member to its parent clas...
Definition: abg-ir.h:2954
Abstracts a declaration for an enum type.
Definition: abg-ir.h:2750
This is an abstraction of the set of resources necessary to manage several aspects of the internal re...
Definition: abg-ir.h:140
Abstraction for a function declaration.
Definition: abg-ir.h:3111
Abstract a function template declaration.
Definition: abg-ir.h:3783
Abstraction of a function type.
Definition: abg-ir.h:3390
This abstracts the global scope of a given translation unit.
Definition: abg-ir.h:1952
The base class for the visitor type hierarchy used for traversing a translation unit.
Definition: abg-ir.h:4955
The entry point to manage locations.
Definition: abg-ir.h:441
The source location of a token.
Definition: abg-ir.h:299
Abstraction of a member function context relationship. This relates a member function to its parent c...
Definition: abg-ir.h:4556
Abstracts a member class template template.
Definition: abg-ir.h:4761
Abstract a member function template.
Definition: abg-ir.h:4706
Abstraction of the declaration of a method.
Definition: abg-ir.h:3927
Abstracts the type of a class member function.
Definition: abg-ir.h:3486
The abstraction of a namespace declaration.
Definition: abg-ir.h:2197
Abstracts non type template parameters.
Definition: abg-ir.h:3660
The abstraction of a pointer type.
Definition: abg-ir.h:2337
The abstraction of a pointer-to-member type.
Definition: abg-ir.h:2466
The abstraction of a qualified type.
Definition: abg-ir.h:2226
Abstracts a reference type.
Definition: abg-ir.h:2400
A declaration that introduces a scope.
Definition: abg-ir.h:1809
A type that introduces a scope.
Definition: abg-ir.h:2171
The base class of templates.
Definition: abg-ir.h:3542
Base class for a template parameter. Client code should use the more specialized type_template_parame...
Definition: abg-ir.h:3577
Abstracts a template template parameter.
Definition: abg-ir.h:3707
This is the abstraction of the set of relevant artefacts (types, variable declarations,...
Definition: abg-ir.h:686
An abstraction helper for type declarations.
Definition: abg-ir.h:1973
This abstracts a composition of types based on template type parameters. The result of the compositio...
Definition: abg-ir.h:3745
A basic type declaration that introduces no scope.
Definition: abg-ir.h:2108
The base class of both types and declarations.
Definition: abg-ir.h:1368
Abstracts a type template parameter.
Definition: abg-ir.h:3623
The abstraction of a typedef declaration.
Definition: abg-ir.h:2889
Abstracts a union type declaration.
Definition: abg-ir.h:4486
Abstracts a variable declaration.
Definition: abg-ir.h:3008
Base type of a direct suppression specifications types.
shared_ptr< diff > diff_sptr
Convenience typedef for a shared_ptr for the diff class.
Definition: abg-fwd.h:76
weak_ptr< diff > diff_wptr
Convenience typedef for a weak_ptr for the diff class.
Definition: abg-fwd.h:82
shared_ptr< diff_context > diff_context_sptr
Convenience typedef for a shared pointer of diff_context.
Definition: abg-fwd.h:68
weak_ptr< diff_context > diff_context_wptr
Convenience typedef for a weak pointer of diff_context.
Definition: abg-fwd.h:74
string get_pretty_representation(diff *d)
Get a copy of the pretty representation of a diff node.
The namespace of the internal representation of ABI artifacts like types and decls.
reference_type_def_sptr lookup_reference_type(const interned_string &type_name, const translation_unit &tu)
Lookup a reference type from a translation unit.
Definition: abg-ir.cc:12558
shared_ptr< type_tparameter > type_tparameter_sptr
Convenience typedef for a shared pointer to type_tparameter.
Definition: abg-fwd.h:331
shared_ptr< reference_type_def > reference_type_def_sptr
Convenience typedef for a shared pointer on a reference_type_def.
Definition: abg-fwd.h:233
const type_base_sptr lookup_type_in_scope(const string &fqn, const scope_decl_sptr &skope)
Lookup a type in a scope.
Definition: abg-ir.cc:12740
bool is_non_canonicalized_type(const type_base *t)
Test if a given type is allowed to be non canonicalized.
Definition: abg-ir.cc:27947
shared_ptr< dm_context_rel > dm_context_rel_sptr
A convenience typedef for a shared pointer to dm_context_rel.
Definition: abg-fwd.h:249
bool get_member_function_is_dtor(const function_decl &f)
Test whether a member function is a destructor.
Definition: abg-ir.cc:6695
const type_base * peel_qualified_type(const type_base *type)
Return the leaf underlying type of a qualified type.
Definition: abg-ir.cc:7456
weak_ptr< typedef_decl > typedef_decl_wptr
Convenience typedef for a weak pointer on a typedef_decl.
Definition: abg-fwd.h:171
type_decl_sptr lookup_basic_type(const interned_string &type_name, const translation_unit &tu)
Lookup a basic type from a translation unit.
Definition: abg-ir.cc:12227
shared_ptr< method_type > method_type_sptr
Convenience typedef for shared pointer to method_type.
Definition: abg-fwd.h:219
size_t hash_type(const type_base *t)
Hash an ABI artifact that is either a type.
Definition: abg-ir.cc:27924
var_decl_sptr get_last_data_member(const class_or_union &klass)
Get the last data member of a class type.
Definition: abg-ir.cc:6022
bool is_anonymous_or_typedef_named(const decl_base &d)
Test if a given decl is anonymous or has a naming typedef.
Definition: abg-ir.cc:6395
weak_ptr< var_decl > var_decl_wptr
Convenience typedef for a weak pointer on a var_decl.
Definition: abg-fwd.h:260
bool get_member_is_static(const decl_base &d)
Gets a flag saying if a class member is static or not.
Definition: abg-ir.cc:5816
pointer_type_def_sptr is_pointer_to_npaf_type(const type_base_sptr &t)
Test if we are looking at a pointer to a neither-a-pointer-to-an-array-nor-a-function type.
Definition: abg-ir.cc:11336
bool debug_equals(const type_or_decl_base *l, const type_or_decl_base *r)
Test if two ABI artifacts are equal.
Definition: abg-ir.cc:10214
shared_ptr< function_decl > function_decl_sptr
Convenience typedef for a shared pointer on a function_decl.
Definition: abg-fwd.h:267
const type_base_wptrs_type * lookup_enum_types(const interned_string &qualified_name, const corpus &corp)
Look into a given corpus to find the enum type*s* that have a given qualified name.
Definition: abg-ir.cc:13808
pointer_type_def_sptr is_pointer_to_array_type(const type_base_sptr &t)
Test if a type is a pointer to array type.
Definition: abg-ir.cc:11318
shared_ptr< class_tdecl > class_tdecl_sptr
Convenience typedef for a shared pointer on a class_tdecl.
Definition: abg-fwd.h:287
weak_ptr< function_type > function_type_wptr
Convenience typedef for a weak pointer on a function_type.
Definition: abg-fwd.h:217
type_base_sptr lookup_class_or_typedef_type(const string &qualified_name, const corpus &corp)
Look into a corpus to find a class, union or typedef type which has a given qualified name.
Definition: abg-ir.cc:13970
void set_member_function_is_virtual(function_decl &f, bool is_virtual)
Set the virtual-ness of a member function.
Definition: abg-ir.cc:6920
ssize_t get_member_function_vtable_offset(const function_decl &f)
Get the vtable offset of a member function.
Definition: abg-ir.cc:6819
vector< type_base_wptr > type_base_wptrs_type
A convenience typedef for a vector of type_base_wptr.
Definition: abg-fwd.h:143
scope_decl * get_type_scope(type_base *t)
Get the scope of a given type.
Definition: abg-ir.cc:8974
qualified_type_def_sptr clone_qualified_type(const qualified_type_def_sptr &t)
Clone a qualifiend type.
Definition: abg-ir.cc:7807
const type_base * is_void_pointer_type(const type_base *t)
Test if a type is a pointer to void type.
Definition: abg-ir.cc:11569
bool is_type(const type_or_decl_base &tod)
Test whether a declaration is a type.
Definition: abg-ir.cc:10665
scope_decl * is_scope_decl(decl_base *d)
Test if a declaration is a scope_decl.
Definition: abg-ir.cc:5686
bool is_anonymous_data_member(const decl_base &d)
Test if a decl is an anonymous data member.
Definition: abg-ir.cc:6113
weak_ptr< type_base > type_base_wptr
Convenience typedef for a weak pointer on a type_base.
Definition: abg-fwd.h:129
type_base_sptr peel_reference_type(const type_base_sptr &type)
Return the leaf pointed-to type node of a reference_type_def node.
Definition: abg-ir.cc:7365
bool has_scope(const decl_base &d)
Tests if a declaration has got a scope.
Definition: abg-ir.cc:5640
type_base_sptr lookup_type_from_translation_unit(const string &type_name, const string &tu_path, const corpus &corp)
Lookup a type from a given translation unit present in a give corpus.
Definition: abg-ir.cc:13367
type_base * get_exemplar_type(const type_base *type)
For a given type, return its exemplar type.
Definition: abg-ir.cc:28018
shared_ptr< non_type_tparameter > non_type_tparameter_sptr
Convenience typedef for shared pointer to non_type_template_parameter.
Definition: abg-fwd.h:317
class_decl_sptr is_compatible_with_class_type(const type_base_sptr &t)
Test if a type is a class. This function looks through typedefs.
Definition: abg-ir.cc:10915
void remove_decl_from_scope(decl_base_sptr decl)
Remove a given decl from its scope.
Definition: abg-ir.cc:8649
bool odr_is_relevant(const type_or_decl_base &artifact)
By looking at the language of the TU a given ABI artifact belongs to, test if the ONE Definition Rule...
Definition: abg-ir.cc:10279
array_type_def_sptr clone_array(const array_type_def_sptr &array)
Clone an array type.
Definition: abg-ir.cc:7740
var_decl_sptr find_last_data_member_matching_regexp(const class_or_union &t, const regex::regex_t_sptr &regex)
Find the last data member of a class or union which name matches a regular expression.
Definition: abg-ir.cc:28499
const ptr_to_mbr_type * is_ptr_to_mbr_type(const type_or_decl_base *t, bool look_through_qualifiers)
Test whether a type is a ptr_to_mbr_type.
Definition: abg-ir.cc:11493
const var_decl_sptr get_first_non_anonymous_data_member(const var_decl_sptr anon_dm)
Get the first non-anonymous data member of a given anonymous data member.
Definition: abg-ir.cc:5959
bool is_user_defined_type(const type_base *t)
Test if a type is user-defined.
Definition: abg-ir.cc:5720
weak_ptr< class_decl > class_decl_wptr
Convenience typedef for a weak pointer on a class_decl.
Definition: abg-fwd.h:203
void debug_comp_stack(const environment &env)
Emit a trace of the two comparison operands stack on the standard error stream.
Definition: abg-ir.cc:10264
bool collect_non_anonymous_data_members(const class_or_union *cou, string_decl_base_sptr_map &dms)
Collect all the non-anonymous data members of a class or union type.
Definition: abg-ir.cc:6056
shared_ptr< global_scope > global_scope_sptr
Convenience typedef for shared pointer on global_scope.
Definition: abg-fwd.h:297
bool is_class_type(const type_or_decl_base &t)
Test whether a type is a class.
Definition: abg-ir.cc:10947
type_base_sptr synthesize_type_from_translation_unit(const type_base_sptr &type, translation_unit &tu)
In a translation unit, lookup a given type or synthesize it if it's a qualified type.
Definition: abg-ir.cc:15053
shared_ptr< array_type_def > array_type_def_sptr
Convenience typedef for a shared pointer on a array_type_def.
Definition: abg-fwd.h:242
function_type_sptr lookup_or_synthesize_fn_type(const function_type_sptr &fn_t, const corpus &corpus)
Look into an ABI corpus for a function type.
Definition: abg-ir.cc:13392
bool is_declaration_only_class_or_union_type(const type_base *t, bool look_through_decl_only)
Test wheter a type is a declaration-only class.
Definition: abg-ir.cc:11131
bool is_anonymous_type(const type_base *t)
Test whether a declaration is a type.
Definition: abg-ir.cc:10716
type_base_sptr lookup_class_typedef_or_enum_type(const string &qualified_name, const corpus &corp)
Look into a corpus to find a class, typedef or enum type which has a given qualified name.
Definition: abg-ir.cc:13995
type_base_sptr peel_const_qualified_type(const qualified_type_def_sptr &q)
If a qualified type is const, then return its underlying type.
Definition: abg-ir.cc:7525
bool is_at_template_scope(const shared_ptr< decl_base > decl)
Tests whether a given decl is at template scope.
Definition: abg-ir.cc:10530
const class_or_union_sptr data_member_has_anonymous_type(const var_decl &d)
Test if a data member has annonymous type or not.
Definition: abg-ir.cc:6299
type_decl * is_integral_type(const type_or_decl_base *t)
Test if a type is an integral type.
Definition: abg-ir.cc:10785
bool anonymous_data_member_exists_in_class(const var_decl &anon_dm, const class_or_union &clazz)
Test if a given anonymous data member exists in a class or union.
Definition: abg-ir.cc:6355
class_decl_sptr lookup_class_type_per_location(const interned_string &loc, const corpus &corp)
Look up a class_decl from a given corpus by its location.
Definition: abg-ir.cc:13671
void set_member_function_is_dtor(function_decl &f, bool d)
Set the destructor-ness property of a member function.
Definition: abg-ir.cc:6723
const type_base_sptr peel_array_type(const type_base_sptr &type)
Return the leaf element type of an array.
Definition: abg-ir.cc:7414
bool types_have_similar_structure(const type_base_sptr &first, const type_base_sptr &second, bool indirect_type)
Test if two types have similar structures, even though they are (or can be) different.
Definition: abg-ir.cc:28162
shared_ptr< template_parameter > template_parameter_sptr
Convenience typedef for shared pointer to template parameter.
Definition: abg-fwd.h:312
class_or_union * is_class_or_union_type(const type_or_decl_base *t)
Test if a type is a class_or_union.
Definition: abg-ir.cc:11178
var_decl_sptr get_data_member(class_or_union *clazz, const char *member_name)
Get a given data member, referred to by its name, of a class type.
Definition: abg-ir.cc:10096
shared_ptr< class_decl > class_decl_sptr
Convenience typedef for a shared pointer on a class_decl.
Definition: abg-fwd.h:191
type_base_sptr peel_typedef_pointer_or_reference_type(const type_base_sptr type)
Return the leaf underlying or pointed-to type node of a typedef_decl, pointer_type_def,...
Definition: abg-ir.cc:7601
void set_member_function_is_const(function_decl &f, bool is_const)
set the const-ness property of a member function.
Definition: abg-ir.cc:6779
decl_base_sptr strip_useless_const_qualification(const qualified_type_def_sptr t)
Strip qualification from a qualified type, when it makes sense.
Definition: abg-ir.cc:7107
namespace_decl_sptr is_namespace(const decl_base_sptr &d)
Tests if a declaration is a namespace declaration.
Definition: abg-ir.cc:11860
const var_decl_sptr get_next_data_member(const class_or_union *klass, const var_decl_sptr &data_member)
In the context of a given class or union, this function returns the data member that is located after...
Definition: abg-ir.cc:5983
void set_member_function_is_ctor(function_decl &f, bool c)
Setter for the is_ctor property of the member function.
Definition: abg-ir.cc:6666
const type_decl * is_type_decl(const type_or_decl_base *t)
Test whether a type is a type_decl (a builtin type).
Definition: abg-ir.cc:10767
decl_base * is_decl_slow(const type_or_decl_base *t)
Test if an ABI artifact is a declaration.
Definition: abg-ir.cc:10645
decl_base_sptr look_through_decl_only(const decl_base &d)
If a decl is decl-only get its definition. Otherwise, just return nil.
Definition: abg-ir.cc:11749
function_type_sptr is_function_type(const type_or_decl_base_sptr &t)
Test whether a type is a function_type.
Definition: abg-ir.cc:11640
vector< class_decl_sptr > classes_type
Convenience typedef for a vector of class_decl_sptr.
Definition: abg-fwd.h:197
string get_name(const type_or_decl_base *tod, bool qualified)
Build and return a copy of the name of an ABI artifact that is either a type or a decl.
Definition: abg-ir.cc:8860
bool is_template_parameter(const shared_ptr< decl_base > decl)
Tests whether a decl is a template parameter.
Definition: abg-ir.cc:10539
typedef_decl_sptr is_typedef(const type_or_decl_base_sptr t)
Test whether a type is a typedef.
Definition: abg-ir.cc:10825
shared_ptr< template_tparameter > template_tparameter_sptr
Convenience typedef for a shared_ptr to template_tparameter.
Definition: abg-fwd.h:325
uint64_t get_var_size_in_bits(const var_decl_sptr &v)
Get the size of a given variable.
Definition: abg-ir.cc:6557
weak_ptr< corpus > corpus_wptr
Convenience typedef for a weak pointer to a corpus.
Definition: abg-fwd.h:132
enum_type_decl_sptr lookup_enum_type_per_location(const interned_string &loc, const corpus &corp)
Look up an enum_type_decl from a given corpus, by its location.
Definition: abg-ir.cc:13838
string get_debug_representation(const type_or_decl_base *artifact)
Get the textual representation of a type for debugging purposes.
Definition: abg-ir.cc:9983
shared_ptr< function_type > function_type_sptr
Convenience typedef for a shared pointer on a function_type.
Definition: abg-fwd.h:209
shared_ptr< typedef_decl > typedef_decl_sptr
Convenience typedef for a shared pointer on a typedef_decl.
Definition: abg-fwd.h:165
function_type_sptr synthesize_function_type_from_translation_unit(const function_type &fn_type, translation_unit &tu)
In a translation unit, lookup the sub-types that make up a given function type and if the sub-types a...
Definition: abg-ir.cc:15136
type_base_sptr peel_pointer_type(const type_base_sptr &type)
Return the leaf pointed-to type node of a pointer_type_def node.
Definition: abg-ir.cc:7309
class_decl_sptr lookup_class_type(const string &fqn, const translation_unit &tu)
Lookup a class type from a translation unit.
Definition: abg-ir.cc:12267
type_base_sptr lookup_type_through_translation_units(const string &qn, const corpus &abi_corpus)
Lookup a type definition in all the translation units of a given ABI corpus.
Definition: abg-ir.cc:13342
qualified_type_def_sptr is_array_of_qualified_element(const array_type_def_sptr &array)
Tests if the element of a given array is a qualified type.
Definition: abg-ir.cc:11938
bool is_typedef_of_maybe_qualified_class_or_union_type(const type_base *t)
Test if a type is a typedef of a class or union type, or a typedef of a qualified class or union type...
Definition: abg-ir.cc:11396
type_base * peel_pointer_or_reference_type(const type_base *type, bool peel_qual_type)
Return the leaf underlying or pointed-to type node of a, pointer_type_def, reference_type_def or qual...
Definition: abg-ir.cc:7703
vector< function_type_sptr > function_types_type
Convenience typedef fo a vector of function_type_sptr.
Definition: abg-fwd.h:214
reference_type_def * is_reference_type(type_or_decl_base *t, bool look_through_qualifiers)
Test whether a type is a reference_type_def.
Definition: abg-ir.cc:11433
bool lookup_decl_only_class_types(const interned_string &qualified_name, const corpus &corp, type_base_wptrs_type &result)
Look into a given corpus to find the class type*s* that have a given qualified name and that are decl...
Definition: abg-ir.cc:13595
bool member_function_has_vtable_offset(const function_decl &f)
Test if a virtual member function has a vtable offset set.
Definition: abg-ir.cc:6808
const enum_type_decl * is_enum_type(const type_or_decl_base *d)
Test if a decl is an enum_type_decl.
Definition: abg-ir.cc:10897
unordered_map< interned_string, type_base_wptrs_type, hash_interned_string > istring_type_base_wptrs_map_type
A convenience typedef for a map which key is an interned_string and which value is a vector of type_b...
Definition: abg-fwd.h:149
bool function_decl_is_less_than(const function_decl &f, const function_decl &s)
Test if the pretty representation of a given function_decl is lexicographically less then the pretty ...
Definition: abg-ir.cc:28110
var_decl_sptr find_data_member_from_anonymous_data_member(const var_decl_sptr &anon_dm, const string &name)
Find a data member inside an anonymous data member.
Definition: abg-ir.cc:10508
const global_scope * get_global_scope(const decl_base &decl)
return the global scope as seen by a given declaration.
Definition: abg-ir.cc:8717
shared_ptr< var_decl > var_decl_sptr
Convenience typedef for a shared pointer on a var_decl.
Definition: abg-fwd.h:254
shared_ptr< ptr_to_mbr_type > ptr_to_mbr_type_sptr
Convenience typedef for a shared pointer to a ptr_to_mbr_type.
Definition: abg-fwd.h:238
const location & get_natural_or_artificial_location(const decl_base *decl)
Get the non-artificial (natural) location of a decl.
Definition: abg-ir.cc:10124
size_t hash_type_or_decl(const type_or_decl_base *tod)
Hash an ABI artifact that is either a type or a decl.
Definition: abg-ir.cc:27845
shared_ptr< scope_decl > scope_decl_sptr
Convenience typedef for a shared pointer on a scope_decl.
Definition: abg-fwd.h:262
shared_ptr< type_or_decl_base > type_or_decl_base_sptr
A convenience typedef for a shared_ptr to type_or_decl_base.
Definition: abg-fwd.h:119
shared_ptr< translation_unit > translation_unit_sptr
Convenience typedef for a shared pointer on a translation_unit type.
Definition: abg-fwd.h:134
shared_ptr< environment > environment_sptr
Convenience typedef for a shared pointer to an environment.
Definition: abg-fwd.h:112
bool is_data_member_of_anonymous_class_or_union(const var_decl &d)
Test if a var_decl is a data member belonging to an anonymous type.
Definition: abg-ir.cc:6231
const type_base * is_void_pointer_type_equivalent(const type_base *type)
Test if a type is equivalent to a pointer to void type.
Definition: abg-ir.cc:11532
const type_base_sptr lookup_type(const interned_string &fqn, const translation_unit &tu)
Lookup a type in a translation unit.
Definition: abg-ir.cc:12673
const decl_base_sptr lookup_var_decl_in_scope(const string &fqn, const scope_decl_sptr &skope)
Lookup a var_decl in a scope.
Definition: abg-ir.cc:12757
type_base * type_has_non_canonicalized_subtype(type_base_sptr t)
Test if a type has sub-types that are non-canonicalized.
Definition: abg-ir.cc:27782
unordered_map< string, decl_base_sptr > string_decl_base_sptr_map
Convenience typedef for a map which key is a string and which value is a decl_base_sptr.
Definition: abg-fwd.h:158
bool is_function_template_pattern(const shared_ptr< decl_base > decl)
Test whether a decl is the pattern of a function template.
Definition: abg-ir.cc:11892
bool get_data_member_is_laid_out(const var_decl &m)
Test whether a data member is laid out.
Definition: abg-ir.cc:6585
bool is_template_parm_composition_type(const shared_ptr< decl_base > decl)
Tests whether a decl is a template parameter composition type.
Definition: abg-ir.cc:11878
union_decl_sptr lookup_union_type(const interned_string &type_name, const translation_unit &tu)
Lookup a union type from a translation unit.
Definition: abg-ir.cc:12304
type_base_sptr canonicalize(type_base_sptr t)
Compute the canonical type of a given type.
Definition: abg-ir.cc:15880
bool get_member_function_is_const(const function_decl &f)
Test whether a member function is const.
Definition: abg-ir.cc:6751
interned_string get_name_of_reference_to_type(const type_base &pointed_to_type, bool lvalue_reference, bool qualified, bool internal)
Get the name of the reference to a given type.
Definition: abg-ir.cc:9206
shared_ptr< pointer_type_def > pointer_type_def_sptr
Convenience typedef for a shared pointer on a pointer_type_def.
Definition: abg-fwd.h:224
unordered_map< string, translation_unit_sptr > string_tu_map_type
Convenience typedef for a map that associates a string to a translation unit.
Definition: abg-fwd.h:140
bool is_const_qualified_type(const qualified_type_def_sptr &t)
Test if a given qualified type is const.
Definition: abg-ir.cc:7493
type_base_sptr lookup_type_per_location(const interned_string &loc, const corpus &corp)
Lookup a type from a corpus, by its location.
Definition: abg-ir.cc:14300
bool get_next_data_member_offset(const class_or_union *klass, const var_decl_sptr &dm, uint64_t &offset)
Get the offset of the non-static data member that comes after a given one.
Definition: abg-ir.cc:6470
enum_type_decl_sptr lookup_enum_type(const interned_string &type_name, const translation_unit &tu)
Lookup an enum type from a translation unit.
Definition: abg-ir.cc:12372
uint64_t get_absolute_data_member_offset(const var_decl &m)
Get the absolute offset of a data member.
Definition: abg-ir.cc:6514
shared_ptr< ir_traversable_base > ir_traversable_base_sptr
Convenience typedef for a shared pointer to ir_traversable_base.
Definition: abg-fwd.h:106
bool is_member_function(const function_decl &f)
Test whether a function_decl is a member function.
Definition: abg-ir.cc:6609
var_decl * is_var_decl(const type_or_decl_base *tod)
Tests if a declaration is a variable declaration.
Definition: abg-ir.cc:11841
const type_base_sptr lookup_type_through_scopes(const type_base_sptr type, const translation_unit &tu)
Lookup a type from a translation unit by walking the scopes of the translation unit in sequence and l...
Definition: abg-ir.cc:13034
decl_base * is_decl(const type_or_decl_base *d)
Test if an ABI artifact is a declaration.
Definition: abg-ir.cc:10605
void keep_type_alive(type_base_sptr t)
Make sure that the life time of a given (smart pointer to a) type is the same as the life time of the...
Definition: abg-ir.cc:27820
bool is_member_type(const type_base_sptr &t)
Tests if a type is a class member.
Definition: abg-ir.cc:5705
string get_class_or_union_flat_representation(const class_or_union &cou, const string &indent, bool one_line, bool internal, bool qualified_names)
Get the flat representation of an instance of class_or_union type.
Definition: abg-ir.cc:9678
decl_base_sptr add_decl_to_scope(decl_base_sptr decl, scope_decl *scope)
Appends a declaration to a given scope, if the declaration doesn't already belong to one and if the d...
Definition: abg-ir.cc:8625
string build_internal_underlying_enum_type_name(const string &base_name, bool is_anonymous, uint64_t size)
Build the internal name of the underlying type of an enum.
Definition: abg-ir.cc:28453
bool is_npaf_type(const type_base_sptr &t)
Test if a type is a neither a pointer, an array nor a function type.
Definition: abg-ir.cc:10752
shared_ptr< enum_type_decl > enum_type_decl_sptr
Convenience typedef for shared pointer to a enum_type_decl.
Definition: abg-fwd.h:173
void set_data_member_offset(var_decl_sptr m, uint64_t o)
Set the offset of a data member into its containing class.
Definition: abg-ir.cc:6408
type_base_sptr strip_typedef(const type_base_sptr type)
Recursively returns the the underlying type of a typedef. The return type should not be a typedef of ...
Definition: abg-ir.cc:6972
uint64_t get_data_member_offset(const var_decl &m)
Get the offset of a data member.
Definition: abg-ir.cc:6425
vector< class_or_union_sptr > classes_or_unions_type
Convenience typedef for a vector of class_or_union_sptr.
Definition: abg-fwd.h:200
class_or_union * is_at_class_scope(const decl_base_sptr decl)
Tests whether a given decl is at class scope.
Definition: abg-ir.cc:10465
bool get_member_function_is_virtual(const function_decl &f)
Test if a given member function is virtual.
Definition: abg-ir.cc:6882
const pointer_type_def * is_pointer_type(const type_or_decl_base *t, bool look_through_qualifiers)
Test whether a type is a pointer_type_def.
Definition: abg-ir.cc:11261
string get_class_or_enum_flat_representation(const type_base &coe, const string &indent, bool one_line, bool internal, bool qualified_name)
Get the flat representation of an instance of enum_type_decl type.
Definition: abg-ir.cc:9955
class_or_union * anonymous_data_member_to_class_or_union(const var_decl *d)
Get the class_or_union type of a given anonymous data member.
Definition: abg-ir.cc:6271
location get_location(const type_base_sptr &type)
Get the location of the declaration of a given type.
Definition: abg-ir.cc:8940
pointer_type_def_sptr is_pointer_to_function_type(const type_base_sptr &t)
Test if a type is a pointer to function type.
Definition: abg-ir.cc:11301
weak_ptr< decl_base > decl_base_wptr
Convenience typedef for a weak pointer to a decl_base.
Definition: abg-fwd.h:182
decl_base_sptr insert_decl_into_scope(decl_base_sptr decl, scope_decl::declarations::iterator before, scope_decl *scope)
Inserts a declaration into a given scope, before a given IR child node of the scope.
Definition: abg-ir.cc:8668
var_decl_sptr has_fake_flexible_array_data_member(const class_decl &klass)
Test if the last data member of a class is an array with one element.
Definition: abg-ir.cc:11058
interned_string get_function_type_name(const function_type_sptr &fn_type, bool internal)
Get the name of a given function type and return a copy of it.
Definition: abg-ir.cc:9283
class_or_union * look_through_decl_only_class(class_or_union *the_class)
If a class (or union) is a decl-only class, get its definition. Otherwise, just return the initial cl...
Definition: abg-ir.cc:11700
bool is_union_type(const type_or_decl_base &t)
Test if a type is a union_decl.
Definition: abg-ir.cc:11227
const location & get_artificial_or_natural_location(const decl_base *decl)
Get the artificial location of a decl.
Definition: abg-ir.cc:10143
type_base_sptr peel_typedef_type(const type_base_sptr &type)
Return the leaf underlying type node of a typedef_decl node.
Definition: abg-ir.cc:7255
const type_base_wptrs_type * lookup_union_types(const interned_string &qualified_name, const corpus &corp)
Look into a given corpus to find the union type*s* that have a given qualified name.
Definition: abg-ir.cc:13626
shared_ptr< template_decl > template_decl_sptr
Convenience typedef for a shared pointer to template_decl.
Definition: abg-fwd.h:304
array_type_def_sptr is_typedef_of_array(const type_base_sptr &t)
Test if a type is a typedef of an array.
Definition: abg-ir.cc:11976
function_type_sptr lookup_function_type(const interned_string &type_name, const translation_unit &tu)
Lookup a function type from a translation unit.
Definition: abg-ir.cc:12622
bool is_global_scope(const scope_decl &scope)
Tests whether if a given scope is the global scope.
Definition: abg-ir.cc:10410
void set_data_member_is_laid_out(var_decl_sptr m, bool l)
Set a flag saying if a data member is laid out.
Definition: abg-ir.cc:6571
pointer_type_def_sptr is_pointer_to_ptr_to_mbr_type(const type_base_sptr &t)
Test if we are looking at a pointer to pointer to member type.
Definition: abg-ir.cc:11353
bool is_data_member(const var_decl &v)
Test if a var_decl is a data member.
Definition: abg-ir.cc:5854
var_decl_sptr find_first_data_member_matching_regexp(const class_or_union &t, const regex::regex_t_sptr &r)
Find the first data member of a class or union which name matches a regular expression.
Definition: abg-ir.cc:28478
const type_base_wptrs_type * lookup_class_types(const interned_string &qualified_name, const corpus &corp)
Look into a given corpus to find the class type*s* that have a given qualified name.
Definition: abg-ir.cc:13575
const decl_base * get_type_declaration(const type_base *t)
Get the declaration for a given type.
Definition: abg-ir.cc:10298
pointer_type_def_sptr lookup_pointer_type(const interned_string &type_name, const translation_unit &tu)
Lookup a pointer type from a translation unit.
Definition: abg-ir.cc:12496
var_decl_sptr has_flexible_array_data_member(const class_decl &klass)
Test if the last data member of a class is an array with non-finite data member.
Definition: abg-ir.cc:10988
shared_ptr< type_composition > type_composition_sptr
Convenience typedef for shared pointer to type_composition.
Definition: abg-fwd.h:344
void set_member_is_static(decl_base &d, bool s)
Sets the static-ness property of a class member.
Definition: abg-ir.cc:26245
array_type_def * is_array_type(const type_or_decl_base *type, bool look_through_qualifiers)
Test if a type is an array_type_def.
Definition: abg-ir.cc:11905
weak_ptr< template_decl > template_decl_wptr
Convenience typedef for a weak pointer to template_decl.
Definition: abg-fwd.h:310
shared_ptr< mem_fn_context_rel > mem_fn_context_rel_sptr
A convenience typedef for a shared pointer to mem_fn_context_rel.
Definition: abg-fwd.h:276
interned_string get_function_id_or_pretty_representation(const function_decl *fn)
Get the ID of a function, or, if the ID can designate several different functions,...
Definition: abg-ir.cc:9348
shared_ptr< type_decl > type_decl_sptr
Convenience typedef for a shared pointer on a type_decl.
Definition: abg-fwd.h:160
qualified_type_def_sptr lookup_qualified_type(const interned_string &type_name, const translation_unit &tu)
Lookup a qualified type from a translation unit.
Definition: abg-ir.cc:12450
typedef_decl_sptr clone_typedef(const typedef_decl_sptr &t)
Clone a typedef type.
Definition: abg-ir.cc:7782
type_decl_sptr lookup_basic_type_per_location(const interned_string &loc, const corpus &corp)
Lookup a type_decl type from a given corpus, by its location.
Definition: abg-ir.cc:13463
void strip_redundant_quals_from_underyling_types(const qualified_type_def_sptr &t)
Merge redundant qualifiers from a tree of qualified types.
Definition: abg-ir.cc:7230
translation_unit * get_translation_unit(const decl_base &decl)
Return the translation unit a declaration belongs to.
Definition: abg-ir.cc:10381
type_or_decl_base * debug(const type_or_decl_base *artifact)
Emit a textual representation of an artifact to std error stream for debugging purposes.
Definition: abg-ir.cc:10163
shared_ptr< namespace_decl > namespace_decl_sptr
Convenience typedef for a shared pointer on namespace_decl.
Definition: abg-fwd.h:282
string demangle_cplus_mangled_name(const string &mangled_name)
Demangle a C++ mangled name and return the resulting string.
Definition: abg-ir.cc:15210
bool is_unique_type(const type_base_sptr &t)
Test if a type is unique in the entire environment.
Definition: abg-ir.cc:27983
string components_to_type_name(const list< string > &comps)
Turn a set of qualified name components (that name a type) into a qualified name string.
Definition: abg-ir.cc:12117
bool types_are_compatible(const type_base_sptr type1, const type_base_sptr type2)
Test if two types are equal modulo a typedef.
Definition: abg-ir.cc:10332
interned_string get_type_name(const type_base_sptr &t, bool qualified, bool internal)
Get the name of a given type and return a copy of it.
Definition: abg-ir.cc:9009
const scope_decl * get_top_most_scope_under(const decl_base *decl, const scope_decl *scope)
Return the a scope S containing a given declaration and that is right under a given scope P.
Definition: abg-ir.cc:8761
type_base_sptr clone_array_tree(const type_base_sptr t)
Clone a type tree made of an array or a typedef of array.
Definition: abg-ir.cc:7860
string get_enum_flat_representation(const enum_type_decl &enum_type, const string &indent, bool one_line, bool qualified_names)
Get the flat representation of an instance of enum_type_decl type.
Definition: abg-ir.cc:9834
interned_string get_name_of_pointer_to_type(const type_base &pointed_to_type, bool qualified, bool internal)
Get the name of the pointer to a given type.
Definition: abg-ir.cc:9184
typedef_decl_sptr lookup_typedef_type_per_location(const interned_string &loc, const corpus &corp)
Lookup a typedef_decl from a corpus, by its location.
Definition: abg-ir.cc:13933
function_decl * is_function_decl(const type_or_decl_base *d)
Test whether a declaration is a function_decl.
Definition: abg-ir.cc:10553
bool is_template_decl(const decl_base_sptr &decl)
Tests whether a decl is a template.
Definition: abg-ir.cc:12020
bool type_has_sub_type_changes(const type_base_sptr t_v1, const type_base_sptr t_v2)
Tests if the change of a given type effectively comes from just its sub-types. That is,...
Definition: abg-ir.cc:27804
method_type_sptr is_method_type(const type_or_decl_base_sptr &t)
Test whether a type is a method_type.
Definition: abg-ir.cc:11670
qualified_type_def * is_qualified_type(const type_or_decl_base *t)
Test whether a type is a reference_type_def.
Definition: abg-ir.cc:11620
typedef_decl_sptr lookup_typedef_type(const interned_string &type_name, const translation_unit &tu)
Lookup a typedef type from a translation unit.
Definition: abg-ir.cc:12410
bool is_typedef_ptr_or_ref_to_decl_only_class_or_union_type(const type_base *t)
Test if a type is a typedef, pointer or reference to a decl-only class/union.
Definition: abg-ir.cc:11373
union_decl_sptr lookup_union_type_per_location(const interned_string &loc, const corpus &corp)
Lookup a union type in a given corpus, from its location.
Definition: abg-ir.cc:12337
bool class_or_union_types_of_same_kind(const class_or_union *first, const class_or_union *second)
Test if two class or union types are of the same kind.
Definition: abg-ir.cc:11199
string build_qualified_name(const scope_decl *scope, const string &name)
Build and return a qualified name from a name and its scope.
Definition: abg-ir.cc:8906
void set_member_function_vtable_offset(function_decl &f, ssize_t s)
Set the vtable offset of a member function.
Definition: abg-ir.cc:6852
interned_string get_method_type_name(const method_type_sptr fn_type, bool internal)
Get the name of a given method type and return a copy of it.
Definition: abg-ir.cc:9376
enum_type_decl_sptr look_through_decl_only_enum(const enum_type_decl &the_enum)
If an enum is a decl-only enum, get its definition. Otherwise, just return the initial enum.
Definition: abg-ir.cc:11730
shared_ptr< function_tdecl > function_tdecl_sptr
Convenience typedef for a shared pointer on a function_tdecl.
Definition: abg-fwd.h:292
enum_type_decl_sptr is_compatible_with_enum_type(const type_base_sptr &t)
Test if a type is an enum. This function looks through typedefs.
Definition: abg-ir.cc:10864
type_base * peel_qualified_or_typedef_type(const type_base *type)
Return the leaf underlying type of a qualified or typedef type.
Definition: abg-ir.cc:7550
type_base_sptr type_or_void(const type_base_sptr t, const environment &env)
Return either the type given in parameter if it's non-null, or the void type.
Definition: abg-ir.cc:15240
bool is_at_global_scope(const decl_base &decl)
Tests whether a given declaration is at global scope.
Definition: abg-ir.cc:10438
vector< enum_type_decl_sptr > enums_type
Convenience typedef for a vector of enum_type_decl_sptr.
Definition: abg-fwd.h:179
bool is_member_decl(const decl_base_sptr d)
Tests if a declaration is a class member.
Definition: abg-ir.cc:5658
array_type_def_sptr lookup_array_type(const interned_string &type_name, const translation_unit &tu)
Lookup an array type from a translation unit.
Definition: abg-ir.cc:12602
class_decl_sptr lookup_class_type_through_scopes(const list< string > &fqn, const translation_unit &tu)
Lookup a class type from a translation unit by walking its scopes in sequence and by looking into the...
Definition: abg-ir.cc:13102
void fqn_to_components(const string &fqn, list< string > &comps)
Decompose a fully qualified name into the list of its components.
Definition: abg-ir.cc:12091
bool get_member_function_is_ctor(const function_decl &f)
Test whether a member function is a constructor.
Definition: abg-ir.cc:6636
std::shared_ptr< regex_t > regex_t_sptr
A convenience typedef for a shared pointer of regex_t.
Definition: abg-fwd.h:88
vector< suppression_sptr > suppressions_type
Convenience typedef for a vector of suppression_sptr.
Definition: abg-fwd.h:1658
shared_ptr< suppression_base > suppression_sptr
Convenience typedef for a shared pointer to a suppression.
Definition: abg-fwd.h:1652
bool base_name(string const &path, string &file_name)
Return the file name part of a file part.
Toplevel namespace for libabigail.
void dump_decl_location(const decl_base &d, ostream &o)
Serialize the source location of a decl to an output stream for debugging purposes.
Definition: abg-writer.cc:5105
void dump(const decl_base_sptr d, std::ostream &o, const bool annotate)
Serialize a pointer to decl_base to an output stream.
Definition: abg-writer.cc:4965
A functor to hash instances of interned_string.
The base of an entity of the intermediate representation that is to be traversed.
Definition: abg-ir.h:462