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-2025 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 
26 /// Toplevel namespace for libabigail.
27 namespace abigail
28 {
29 /**
30  @mainpage libabigail
31 
32  This is the API documentation of the Application Binary
33  Interface Generic Analysis and Instrumentation Library, aka,
34  <em>libabigail</em>.
35 
36  Check out <a href="http://sourceware.org/libabigail"> the project
37  homepage</a>!
38 
39  The current libabigail source code can be browsed at
40  http://sourceware.org/git/gitweb.cgi?p=libabigail.git
41 
42  It can be checked out with:
43  <em>git clone git://sourceware.org/git/libabigail.git</em>
44 
45  The mailing list to send messages and patches to is
46  libabigail@sourceware.org.
47 
48  You can hang out with libabigail developers and users on irc at
49  irc://irc.oftc.net\#libabigail.
50 */
51 
52 // Inject some types.
53 using std::shared_ptr;
54 using std::weak_ptr;
55 using std::unordered_map;
56 using std::string;
57 using std::vector;
58 using std::unordered_set;
59 
60 typedef unordered_set<string> string_set_type;
61 
62 // Pull in relational operators.
63 using namespace std::rel_ops;
64 
65 namespace comparison
66 {
68 
69 /// Convenience typedef for a shared pointer of @ref diff_context.
70 typedef shared_ptr<diff_context> diff_context_sptr;
71 
72 /// Convenience typedef for a weak pointer of @ref diff_context.
73 typedef weak_ptr<diff_context> diff_context_wptr;
74 
75 class diff;
76 
77 /// Convenience typedef for a shared_ptr for the @ref diff class
78 typedef shared_ptr<diff> diff_sptr;
79 
80 /// Convenience typedef for a weak_ptr for the @ref diff class
81 typedef weak_ptr<diff> diff_wptr;
82 }
83 
84 namespace regex
85 {
86 /// A convenience typedef for a shared pointer of regex_t.
87 typedef std::shared_ptr<regex_t> regex_t_sptr;
88 }// end namespace regex
89 
90 namespace ir
91 {
92 
93 // Forward declarations for corpus.
94 
95 class corpus;
96 typedef shared_ptr<corpus> corpus_sptr;
97 
98 class corpus_group;
99 typedef shared_ptr<corpus_group> corpus_group_sptr;
100 
101 // Forward declarations for ir.
102 
103 class ir_node_visitor;
104 
106 
107 /// Convenience typedef for a shared pointer to @ref
108 /// ir_traversable_base.
109 typedef shared_ptr<ir_traversable_base> ir_traversable_base_sptr;
110 
112 /// Convenience typedef for a shared pointer to an @ref environment
113 typedef shared_ptr<environment> environment_sptr;
114 
115 class location;
116 class location_manager;
117 
119 /// A convenience typedef for a shared_ptr to @ref type_or_decl_base.
120 typedef shared_ptr<type_or_decl_base> type_or_decl_base_sptr;
121 
122 class type_base;
123 
124 // Convenience typedef for a shared pointer on a @ref type_base
125 typedef shared_ptr<type_base> type_base_sptr;
126 
127 /// Convenience typedef for a weak pointer on a @ref type_base
128 typedef weak_ptr<type_base> type_base_wptr;
129 
130 /// Convenience typedef for a weak pointer to a @ref corpus.
131 typedef weak_ptr<corpus> corpus_wptr;
132 
134 /// Convenience typedef for a shared pointer on a @ref
135 /// translation_unit type.
136 typedef shared_ptr<translation_unit> translation_unit_sptr;
137 /// Convenience typedef for a map that associates a string to a
138 /// translation unit.
139 typedef unordered_map<string, translation_unit_sptr> string_tu_map_type;
140 
141 /// A convenience typedef for a vector of type_base_wptr.
142 typedef vector<type_base_wptr> type_base_wptrs_type;
143 
144 /// A convenience typedef for a map which key is an interned_string
145 /// and which value is a vector of type_base_wptr.
146 typedef unordered_map<interned_string,
149 
150 class decl_base;
151 
152 // Convenience typedef for a smart pointer on @ref decl_base.
153 typedef shared_ptr<decl_base> decl_base_sptr;
154 
155 /// Convenience typedef for a map which key is a string and which
156 /// value is a @ref decl_base_sptr.
157 typedef unordered_map<string, decl_base_sptr> string_decl_base_sptr_map;
158 
159 class type_decl;
160 /// Convenience typedef for a shared pointer on a @ref type_decl.
161 typedef shared_ptr<type_decl> type_decl_sptr;
162 
163 
165 
166 /// Convenience typedef for a shared pointer on a @ref typedef_decl.
167 typedef shared_ptr<typedef_decl> typedef_decl_sptr;
168 
169 /// Convenience typedef for a weak pointer on a @ref typedef_decl.
170 typedef weak_ptr<typedef_decl> typedef_decl_wptr;
171 
173 
174 /// Convenience typedef for shared pointer to a @ref enum_type_decl.
175 typedef shared_ptr<enum_type_decl> enum_type_decl_sptr;
176 
177 /// Convenience typedef for a vector of @ref enum_type_decl_sptr
178 typedef vector<enum_type_decl_sptr> enums_type;
179 
180 /// Convenience typedef for a weak pointer to a @ref decl_base.
181 typedef weak_ptr<decl_base> decl_base_wptr;
182 
183 class class_or_union;
184 
185 typedef shared_ptr<class_or_union> class_or_union_sptr;
186 typedef weak_ptr<class_or_union> class_or_union_wptr;
187 
188 class scope_type_decl;
189 
191 
192 /// Convenience typedef for a shared pointer on a @ref class_decl
193 typedef shared_ptr<class_decl> class_decl_sptr;
194 
195 /// Convenience typedef for a vector of @ref class_decl_sptr
196 typedef vector<class_decl_sptr> classes_type;
197 
198 /// Convenience typedef for a vector of @ref class_or_union_sptr
199 typedef vector<class_or_union_sptr> classes_or_unions_type;
200 
201 /// Convenience typedef for a weak pointer on a @ref class_decl.
202 typedef weak_ptr<class_decl> class_decl_wptr;
203 
204 class union_decl;
205 
206 typedef shared_ptr<union_decl> union_decl_sptr;
207 
209 /// Convenience typedef for a shared pointer on a @ref function_type
210 typedef shared_ptr<function_type> function_type_sptr;
211 
212 /// Convenience typedef fo a vector of @ref function_type_sptr
213 typedef vector<function_type_sptr> function_types_type;
214 
215 /// Convenience typedef for a weak pointer on a @ref function_type
216 typedef weak_ptr<function_type> function_type_wptr;
217 
219 
220 /// Convenience typedef for shared pointer to @ref method_type.
221 typedef shared_ptr<method_type> method_type_sptr;
222 
224 
225 /// Convenience typedef for a shared pointer on a @ref pointer_type_def
226 typedef shared_ptr<pointer_type_def> pointer_type_def_sptr;
227 
228 class qualified_type_def;
229 
230 typedef shared_ptr<qualified_type_def> qualified_type_def_sptr;
231 
233 
234 /// Convenience typedef for a shared pointer on a @ref reference_type_def
235 typedef shared_ptr<reference_type_def> reference_type_def_sptr;
236 
238 /// Convenience typedef for a shared pointer to a @ref ptr_to_mbr_type
239 typedef shared_ptr<ptr_to_mbr_type> ptr_to_mbr_type_sptr;
240 
242 
243 /// Convenience typedef for a shared pointer on a @ref array_type_def
244 typedef shared_ptr<array_type_def> array_type_def_sptr;
245 
246 class subrange_type;
247 
249 
250 /// A convenience typedef for a shared pointer to dm_context_rel.
251 typedef shared_ptr<dm_context_rel> dm_context_rel_sptr;
252 
253 class var_decl;
254 
255 /// Convenience typedef for a shared pointer on a @ref var_decl
256 typedef shared_ptr<var_decl> var_decl_sptr;
257 
258 /// Convenience typedef for a weak pointer on a @ref var_decl
259 typedef weak_ptr<var_decl> var_decl_wptr;
260 
262 
263 /// Convenience typedef for a shared pointer on a @ref scope_decl.
264 typedef shared_ptr<scope_decl> scope_decl_sptr;
265 
267 
268 /// Convenience typedef for a shared pointer on a @ref function_decl
269 typedef shared_ptr<function_decl> function_decl_sptr;
270 
271 class method_decl;
272 
273 typedef shared_ptr<method_decl> method_decl_sptr;
274 
276 
277 /// A convenience typedef for a shared pointer to @ref
278 /// mem_fn_context_rel.
279 typedef shared_ptr<mem_fn_context_rel> mem_fn_context_rel_sptr;
280 
282 
283 /// Convenience typedef for a shared pointer on namespace_decl.
284 typedef shared_ptr<namespace_decl> namespace_decl_sptr;
285 
287 
288 /// Convenience typedef for a shared pointer on a @ref class_tdecl
289 typedef shared_ptr<class_tdecl> class_tdecl_sptr;
290 
292 
293 /// Convenience typedef for a shared pointer on a @ref function_tdecl
294 typedef shared_ptr<function_tdecl> function_tdecl_sptr;
295 
297 
298 /// Convenience typedef for shared pointer on @ref global_scope.
299 typedef shared_ptr<global_scope> global_scope_sptr;
300 
301 class node_visitor;
302 
304 
305 /// Convenience typedef for a shared pointer to @ref template_decl
306 typedef shared_ptr<template_decl> template_decl_sptr;
307 
308 /// Convenience typedef for a weak pointer to template_decl
309 typedef weak_ptr<template_decl> template_decl_wptr;
310 
312 
313 /// Convenience typedef for shared pointer to template parameter
314 typedef shared_ptr<template_parameter> template_parameter_sptr;
315 
317 
318 /// Convenience typedef for shared pointer to @ref
319 /// non_type_template_parameter
320 typedef shared_ptr<non_type_tparameter> non_type_tparameter_sptr;
321 
322 class type_tparameter;
323 
325 
326 /// Convenience typedef for a shared_ptr to @ref template_tparameter.
327 typedef shared_ptr<template_tparameter> template_tparameter_sptr;
328 
329 /// Convenience typedef for a shared pointer to @ref type_tparameter.
330 typedef shared_ptr<type_tparameter> type_tparameter_sptr;
331 
332 class type_composition;
333 
335 typedef shared_ptr<member_function_template> member_function_template_sptr;
336 typedef vector<member_function_template_sptr> member_function_templates;
337 
339 typedef shared_ptr<member_class_template> member_class_template_sptr;
340 typedef vector<member_class_template_sptr> member_class_templates;
341 
342 /// Convenience typedef for shared pointer to type_composition
343 typedef shared_ptr<type_composition> type_composition_sptr;
344 
345 decl_base_sptr
346 add_decl_to_scope(decl_base_sptr, scope_decl*);
347 
348 decl_base_sptr
349 add_decl_to_scope(decl_base_sptr, const scope_decl_sptr&);
350 
351 const global_scope*
353 
354 const global_scope*
356 
357 const global_scope*
358 get_global_scope(const decl_base_sptr);
359 
362 
365 
367 get_translation_unit(const type_or_decl_base_sptr&);
368 
369 bool
371 
372 const global_scope*
374 
375 bool
376 is_global_scope(const scope_decl_sptr);
377 
378 bool
380 
381 bool
382 is_at_global_scope(const decl_base_sptr);
383 
384 bool
386 
388 is_at_class_scope(const decl_base_sptr);
389 
392 
395 
396 bool
397 is_at_template_scope(const decl_base_sptr);
398 
399 bool
400 is_template_parameter(const decl_base_sptr);
401 
404 
405 function_decl_sptr
406 is_function_decl(const type_or_decl_base_sptr&);
407 
408 bool
410 
411 decl_base*
412 is_decl(const type_or_decl_base*);
413 
414 decl_base_sptr
415 is_decl(const type_or_decl_base_sptr&);
416 
417 decl_base*
419 
420 decl_base_sptr
421 is_decl_slow(const type_or_decl_base_sptr&);
422 
423 bool
424 is_type(const type_or_decl_base&);
425 
426 type_base*
427 is_type(const type_or_decl_base*);
428 
429 type_base_sptr
430 is_type(const type_or_decl_base_sptr& tod);
431 
432 bool
434 
435 bool
436 is_anonymous_type(const type_base_sptr&);
437 
438 bool
439 is_npaf_type(const type_base_sptr&);
440 
441 const type_decl*
443 
444 type_decl_sptr
445 is_type_decl(const type_or_decl_base_sptr&);
446 
447 type_decl*
449 
450 type_decl_sptr
451 is_integral_type(const type_or_decl_base_sptr&);
452 
453 type_decl*
455 
456 type_decl_sptr
457 is_real_type(const type_or_decl_base_sptr&);
458 
459 typedef_decl_sptr
460 is_typedef(const type_or_decl_base_sptr);
461 
462 const typedef_decl*
464 
465 const typedef_decl*
466 is_typedef(const type_base*);
467 
470 
471 const enum_type_decl*
473 
474 enum_type_decl_sptr
475 is_compatible_with_enum_type(const type_base_sptr&);
476 
477 enum_type_decl_sptr
478 is_compatible_with_enum_type(const decl_base_sptr&);
479 
480 enum_type_decl_sptr
481 is_enum_type(const type_or_decl_base_sptr&);
482 
483 const enum_type_decl*
485 
486 bool
488 
489 class_decl*
491 
492 class_decl_sptr
493 is_class_type(const type_or_decl_base_sptr&);
494 
495 var_decl_sptr
497 
498 var_decl_sptr
500 
501 var_decl_sptr
502 has_flexible_array_data_member(const class_decl_sptr&);
503 
504 var_decl_sptr
506 
507 var_decl_sptr
509 
510 var_decl_sptr
511 has_fake_flexible_array_data_member(const class_decl_sptr&);
512 
513 bool
515  bool look_through_decl_only = false);
516 
517 bool
518 is_declaration_only_class_or_union_type(const type_base_sptr& t,
519  bool look_through_decl_only = false);
520 
523 
524 class_or_union_sptr
525 is_class_or_union_type(const type_or_decl_base_sptr&);
526 
527 bool
529  const class_or_union*);
530 
531 bool
532 class_or_union_types_of_same_kind(const class_or_union_sptr&,
533  const class_or_union_sptr&);
534 
535 bool
537 
538 union_decl*
540 
541 union_decl_sptr
542 is_union_type(const type_or_decl_base_sptr&);
543 
544 const class_decl*
546 
547 class_decl_sptr
548 is_compatible_with_class_type(const type_base_sptr&);
549 
550 class_decl_sptr
551 is_compatible_with_class_type(const decl_base_sptr&);
552 
553 const pointer_type_def*
555  bool look_through_qualifiers=false);
556 
557 pointer_type_def_sptr
558 is_pointer_type(const type_or_decl_base_sptr&,
559  bool look_through_qualifiers=false);
560 
561 pointer_type_def_sptr
562 is_pointer_to_function_type(const type_base_sptr&);
563 
564 pointer_type_def_sptr
565 is_pointer_to_array_type(const type_base_sptr&);
566 
567 pointer_type_def_sptr
568 is_pointer_to_ptr_to_mbr_type(const type_base_sptr&);
569 
570 pointer_type_def_sptr
571 is_pointer_to_npaf_type(const type_base_sptr&);
572 
573 bool
575 
576 bool
578 
579 bool
581 
583 is_reference_type(type_or_decl_base*, bool look_through_qualifiers=false);
584 
585 const reference_type_def*
586 is_reference_type(const type_or_decl_base*, bool look_through_qualifiers=false);
587 
588 reference_type_def_sptr
589 is_reference_type(const type_or_decl_base_sptr&,
590  bool look_through_qualifiers=false);
591 
592 const ptr_to_mbr_type*
594  bool look_through_qualifiers=false);
595 
596 ptr_to_mbr_type_sptr
597 is_ptr_to_mbr_type(const type_or_decl_base_sptr&,
598  bool look_through_qualifiers=false);
599 
600 const type_base*
602 
603 const type_base_sptr
604 is_void_pointer_type(const type_base_sptr&);
605 
606 const type_base*
608 
609 const type_base*
611 
614 
615 qualified_type_def_sptr
616 is_qualified_type(const type_or_decl_base_sptr&);
617 
618 bool
619 is_const_qualified_type(const type_base_sptr& t);
620 
621 bool
622 is_const_qualified_type(const qualified_type_def_sptr&);
623 
624 type_base_sptr
625 peel_const_qualified_type(const qualified_type_def_sptr&);
626 
627 function_type_sptr
628 is_function_type(const type_or_decl_base_sptr&);
629 
632 
633 const function_type*
635 
636 method_type_sptr
637 is_method_type(const type_or_decl_base_sptr&);
638 
639 const method_type*
641 
644 
645 class_or_union_sptr
647 
648 class_or_union_sptr
649 look_through_decl_only_class(class_or_union_sptr);
650 
653 
654 enum_type_decl_sptr
656 
657 enum_type_decl_sptr
658 look_through_decl_only_enum(enum_type_decl_sptr);
659 
660 decl_base_sptr
662 
663 decl_base*
665 
666 decl_base_sptr
667 look_through_decl_only(const decl_base_sptr&);
668 
669 type_base*
671 
672 type_base_sptr
673 look_through_decl_only_type(const type_base_sptr&);
674 
675 var_decl*
677 
678 var_decl_sptr
679 is_var_decl(const type_or_decl_base_sptr&);
680 
681 namespace_decl_sptr
682 is_namespace(const decl_base_sptr&);
683 
685 is_namespace(const decl_base*);
686 
687 bool
688 is_template_parm_composition_type(const decl_base_sptr);
689 
690 bool
691 is_template_decl(const decl_base_sptr);
692 
693 bool
694 is_function_template_pattern(const decl_base_sptr);
695 
696 
697 decl_base_sptr
698 insert_decl_into_scope(decl_base_sptr,
699  vector<decl_base_sptr >::iterator,
700  scope_decl*);
701 
702 decl_base_sptr
703 insert_decl_into_scope(decl_base_sptr,
704  vector<decl_base_sptr >::iterator,
705  scope_decl_sptr);
706 
707 bool
708 has_scope(const decl_base&);
709 
710 bool
711 has_scope(const decl_base_sptr);
712 
713 bool
714 is_member_decl(const decl_base_sptr);
715 
716 bool
717 is_member_decl(const decl_base*);
718 
719 bool
720 is_member_decl(const decl_base&);
721 
722 const scope_decl*
723 is_scope_decl(const decl_base*);
724 
725 scope_decl_sptr
726 is_scope_decl(const decl_base_sptr&);
727 
728 bool
729 is_member_type(const type_base_sptr&);
730 
731 bool
733 
734 bool
735 is_user_defined_type(const type_base_sptr&);
736 
737 void
738 remove_decl_from_scope(decl_base_sptr);
739 
740 bool
742 
743 bool
745 
746 bool
747 get_member_is_static(const decl_base_sptr&);
748 
749 void
751 
752 void
753 set_member_is_static(const decl_base_sptr&, bool);
754 
755 bool
756 is_data_member(const var_decl&);
757 
758 var_decl*
760 
761 bool
762 is_data_member(const var_decl*);
763 
764 var_decl_sptr
765 is_data_member(const type_or_decl_base_sptr&);
766 
767 bool
768 is_data_member(const var_decl_sptr);
769 
770 var_decl_sptr
771 is_data_member(const decl_base_sptr&);
772 
773 var_decl*
774 is_data_member(const decl_base *);
775 
776 var_decl*
777 is_data_member(const decl_base *);
778 
779 const var_decl_sptr
780 get_next_data_member(const class_or_union_sptr&, const var_decl_sptr&);
781 
782 var_decl_sptr
784 
785 var_decl_sptr
787 
788 var_decl_sptr
789 get_last_data_member(const class_or_union_sptr&);
790 
791 bool
792 collect_non_anonymous_data_members(const class_or_union* cou, string_decl_base_sptr_map& dms);
793 
794 bool
795 collect_non_anonymous_data_members(const class_or_union_sptr &cou, string_decl_base_sptr_map& dms);
796 
797 bool
799 
800 const var_decl*
802 
803 const var_decl*
805 
806 var_decl_sptr
807 is_anonymous_data_member(const type_or_decl_base_sptr&);
808 
809 var_decl_sptr
810 is_anonymous_data_member(const decl_base_sptr&);
811 
812 var_decl_sptr
813 is_anonymous_data_member(const var_decl_sptr&);
814 
815 const var_decl*
817 
818 bool
820 
821 bool
823 
824 bool
826 
827 bool
828 is_data_member_of_anonymous_class_or_union(const var_decl_sptr&);
829 
830 const var_decl_sptr
831 get_first_non_anonymous_data_member(const var_decl_sptr);
832 
833 var_decl_sptr
835  const string&);
836 
839 
840 class_or_union_sptr
841 anonymous_data_member_to_class_or_union(const var_decl_sptr&);
842 
843 class_or_union_sptr
845 
846 bool
848  const class_or_union& clazz);
849 
850 bool
852 
853 const class_or_union_sptr
855 
856 const class_or_union_sptr
858 
859 const class_or_union_sptr
860 data_member_has_anonymous_type(const var_decl_sptr& d);
861 
863 is_array_type(const type_or_decl_base* decl,
864  bool look_through_qualifiers = false);
865 
866 array_type_def_sptr
867 is_array_type(const type_or_decl_base_sptr& decl,
868  bool look_through_qualifiers = false);
869 
870 array_type_def_sptr
871 is_array_of_qualified_element(const type_base_sptr&);
872 
873 qualified_type_def_sptr
874 is_array_of_qualified_element(const array_type_def_sptr&);
875 
876 array_type_def_sptr
877 is_typedef_of_array(const type_base_sptr&);
878 
879 void
880 set_data_member_offset(var_decl_sptr, uint64_t);
881 
882 uint64_t
884 
885 uint64_t
886 get_data_member_offset(const var_decl_sptr);
887 
888 uint64_t
889 get_data_member_offset(const decl_base_sptr);
890 
891 uint64_t
893 
894 bool
896  const var_decl_sptr&,
897  uint64_t&);
898 
899 bool
900 get_next_data_member_offset(const class_or_union_sptr&,
901  const var_decl_sptr&,
902  uint64_t&);
903 
904 uint64_t
905 get_var_size_in_bits(const var_decl_sptr&);
906 
907 void
908 set_data_member_is_laid_out(var_decl_sptr, bool);
909 
910 bool
912 
913 bool
914 get_data_member_is_laid_out(const var_decl_sptr);
915 
916 bool
918 
919 bool
921 
922 bool
923 is_member_function(const function_decl_sptr&);
924 
925 bool
927 
928 bool
929 get_member_function_is_ctor(const function_decl_sptr&);
930 
931 void
933 
934 void
935 set_member_function_is_ctor(const function_decl_sptr&, bool);
936 
937 bool
939 
940 bool
941 get_member_function_is_dtor(const function_decl_sptr&);
942 
943 void
945 
946 void
947 set_member_function_is_dtor(const function_decl_sptr&, bool);
948 
949 bool
951 
952 bool
953 get_member_function_is_const(const function_decl_sptr&);
954 
955 void
957 
958 void
959 set_member_function_is_const(const function_decl_sptr&, bool);
960 
961 bool
963 
964 ssize_t
966 
967 ssize_t
968 get_member_function_vtable_offset(const function_decl_sptr&);
969 
970 bool
972 
973 bool
974 get_member_function_is_virtual(const function_decl_sptr&);
975 
976 bool
978 
979 void
981 void
983 void
984 set_member_function_virtuality(const function_decl_sptr&, bool, ssize_t);
985 
986 type_base_sptr
987 strip_typedef(const type_base_sptr);
988 
989 decl_base_sptr
990 strip_useless_const_qualification(const qualified_type_def_sptr t);
991 
992 void
993 strip_redundant_quals_from_underyling_types(const qualified_type_def_sptr&);
994 
995 type_base_sptr
996 peel_typedef_type(const type_base_sptr&);
997 
998 const type_base*
1000 
1001 type_base_sptr
1002 peel_pointer_type(const type_base_sptr&);
1003 
1004 const type_base*
1006 
1007 type_base_sptr
1008 peel_reference_type(const type_base_sptr&);
1009 
1010 const type_base*
1012 
1013 const type_base_sptr
1014 peel_array_type(const type_base_sptr&);
1015 
1016 const type_base*
1017 peel_array_type(const type_base*);
1018 
1019 const type_base*
1021 
1022 const type_base_sptr
1023 peel_qualified_type(const type_base_sptr&);
1024 
1025 type_base*
1027 
1028 type_base_sptr
1029 peel_qualified_or_typedef_type(const type_base_sptr &type);
1030 
1031 type_base_sptr
1032 peel_typedef_pointer_or_reference_type(const type_base_sptr);
1033 
1034 type_base*
1036 
1037 type_base*
1039  bool peel_qual_type);
1040 
1041 type_base*
1043  bool peel_qualified_type = true);
1044 
1045 array_type_def_sptr
1046 clone_array(const array_type_def_sptr& array);
1047 
1048 typedef_decl_sptr
1049 clone_typedef(const typedef_decl_sptr& t);
1050 
1051 qualified_type_def_sptr
1052 clone_qualified_type(const qualified_type_def_sptr& t);
1053 
1054 type_base_sptr
1055 clone_array_tree(const type_base_sptr t);
1056 
1057 string
1058 get_name(const type_or_decl_base*, bool qualified = true);
1059 
1060 string
1061 get_name(const type_or_decl_base_sptr&,
1062  bool qualified = true);
1063 
1064 location
1065 get_location(const type_base_sptr& type);
1066 
1067 location
1068 get_location(const decl_base_sptr& decl);
1069 
1070 string
1071 build_qualified_name(const scope_decl* scope, const string& name);
1072 
1073 string
1074 build_qualified_name(const scope_decl* scope,
1075  const type_base_sptr& type);
1076 
1077 scope_decl*
1079 
1080 scope_decl*
1081 get_type_scope(const type_base_sptr&);
1082 
1083 interned_string
1084 get_type_name(const type_base_sptr&,
1085  bool qualified = true,
1086  bool internal = false);
1087 
1088 interned_string
1089 get_type_name(const type_base*,
1090  bool qualified = true,
1091  bool internal = false);
1092 
1093 interned_string
1094 get_type_name(const type_base&,
1095  bool qualified = true,
1096  bool internal = false);
1097 
1098 interned_string
1099 get_name_of_pointer_to_type(const type_base& pointed_to_type,
1100  bool qualified = true,
1101  bool internal = false);
1102 
1103 interned_string
1104 get_name_of_reference_to_type(const type_base& pointed_to_type,
1105  bool lvalue_reference = false,
1106  bool qualified = true,
1107  bool internal = false);
1108 
1109 interned_string
1110 get_function_type_name(const function_type_sptr&,
1111  bool internal = false);
1112 
1113 interned_string
1114 get_function_type_name(const function_type*, bool internal = false);
1115 
1116 interned_string
1117 get_function_type_name(const function_type&, bool internal = false);
1118 
1119 interned_string
1121 
1122 interned_string
1123 get_method_type_name(const method_type_sptr&, bool internal = false);
1124 
1125 interned_string
1126 get_method_type_name(const method_type*, bool internal = false);
1127 
1128 interned_string
1129 get_method_type_name(const method_type&, bool internal = false);
1130 
1131 string
1132 get_pretty_representation(const decl_base*, bool internal = false);
1133 
1134 string
1135 get_pretty_representation(const type_base*, bool internal = false);
1136 
1137 string
1138 get_pretty_representation(const type_or_decl_base*, bool internal = false);
1139 
1140 string
1141 get_pretty_representation(const type_or_decl_base_sptr&,
1142  bool internal = false);
1143 
1144 string
1145 get_pretty_representation(const decl_base_sptr&, bool internal = false);
1146 
1147 string
1148 get_pretty_representation(const type_base_sptr&, bool internal = false);
1149 
1150 string
1151 get_pretty_representation(const function_type&, bool internal = false);
1152 
1153 string
1154 get_pretty_representation(const function_type*, bool internal = false);
1155 
1156 string
1157 get_pretty_representation(const function_type_sptr&,
1158  bool internal = false);
1159 
1160 string
1161 get_pretty_representation(const method_type&, bool internal = false);
1162 
1163 string
1164 get_pretty_representation(const method_type*, bool internal = false);
1165 
1166 string
1167 get_pretty_representation(const method_type_sptr&,
1168  bool internal = false);
1169 
1170 string
1172  const string& indent,
1173  bool one_line,
1174  bool internal,
1175  bool qualified_name = true);
1176 
1177 string
1179  const string& indent,
1180  bool one_line,
1181  bool internal,
1182  bool qualified_name = true);
1183 
1184 string
1185 get_class_or_union_flat_representation(const class_or_union_sptr& cou,
1186  const string& indent,
1187  bool one_line,
1188  bool internal,
1189  bool qualified_name = true);
1190 
1191 string
1193  const string& indent,
1194  bool one_line,
1195  bool internal,
1196  bool qualified_names);
1197 
1198 string
1200  const string& indent,
1201  bool one_line,
1202  bool internal,
1203  bool qualified_names);
1204 
1205 string
1206 get_enum_flat_representation(const enum_type_decl_sptr& enum_type,
1207  const string& indent,
1208  bool one_line,
1209  bool qualified_names);
1210 
1211 string
1213  const string& indent,
1214  bool one_line,
1215  bool internal,
1216  bool qualified_name);
1217 
1218 string
1220 
1221 var_decl_sptr
1222 get_data_member(class_or_union *, const char*);
1223 
1224 var_decl_sptr
1225 get_data_member(type_base *clazz, const char* member_name);
1226 
1227 const location&
1229 
1230 const location&
1232 
1234 debug(const type_or_decl_base* artifact);
1235 
1236 type_base*
1237 debug(const type_base* artifact);
1238 
1239 decl_base*
1240 debug(const decl_base* artifact);
1241 
1242 bool
1244 
1245 void
1246 debug_comp_stack(const environment& env);
1247 
1248 bool
1250 
1251 const decl_base*
1253 
1254 decl_base*
1256 
1257 decl_base_sptr
1258 get_type_declaration(const type_base_sptr);
1259 
1260 bool
1261 classes_have_same_layout(const type_base_sptr& f,
1262  const type_base_sptr& s);
1263 
1264 bool
1265 types_are_compatible(const type_base_sptr,
1266  const type_base_sptr);
1267 
1268 bool
1269 types_are_compatible(const decl_base_sptr,
1270  const decl_base_sptr);
1271 
1272 const scope_decl*
1274  const scope_decl*);
1275 
1276 const scope_decl*
1277 get_top_most_scope_under(const decl_base_sptr,
1278  const scope_decl*);
1279 
1280 const scope_decl*
1281 get_top_most_scope_under(const decl_base_sptr,
1282  const scope_decl_sptr);
1283 
1284 void
1285 fqn_to_components(const std::string&,
1286  std::list<string>&);
1287 
1288 string
1289 components_to_type_name(const std::list<string>&);
1290 
1291 type_decl_sptr
1293 
1294 type_decl_sptr
1295 lookup_basic_type(const interned_string&, const translation_unit&);
1296 
1297 type_decl_sptr
1298 lookup_basic_type(const string&, const translation_unit&);
1299 
1300 type_decl_sptr
1301 lookup_basic_type(const type_decl&, const corpus&);
1302 
1303 type_decl_sptr
1304 lookup_basic_type(const string&, const corpus&);
1305 
1306 type_decl_sptr
1307 lookup_basic_type(const interned_string&, const corpus&);
1308 
1309 type_decl_sptr
1310 lookup_basic_type_per_location(const interned_string&, const corpus&);
1311 
1312 type_decl_sptr
1313 lookup_basic_type_per_location(const string&, const corpus&);
1314 
1315 class_decl_sptr
1317 
1318 class_decl_sptr
1319 lookup_class_type(const interned_string&, const translation_unit&);
1320 
1321 class_decl_sptr
1322 lookup_class_type(const string&, const translation_unit&);
1323 
1324 class_decl_sptr
1325 lookup_class_type(const class_decl&, const corpus&);
1326 
1327 class_decl_sptr
1328 lookup_class_type(const interned_string&, const corpus&);
1329 
1330 const type_base_wptrs_type*
1331 lookup_class_types(const interned_string&, const corpus&);
1332 
1333 const type_base_wptrs_type*
1334 lookup_union_types(const interned_string&, const corpus&);
1335 
1336 bool
1337 lookup_decl_only_class_types(const interned_string&,
1338  const corpus&,
1339  type_base_wptrs_type&);
1340 
1341 const type_base_wptrs_type*
1342 lookup_class_types(const string&, const corpus&);
1343 
1344 const type_base_wptrs_type*
1345 lookup_union_types(const string&, const corpus&);
1346 
1347 class_decl_sptr
1348 lookup_class_type_per_location(const interned_string&, const corpus&);
1349 
1350 class_decl_sptr
1351 lookup_class_type_per_location(const string&, const corpus&);
1352 
1353 class_decl_sptr
1354 lookup_class_type(const string&, const corpus&);
1355 
1356 class_decl_sptr
1357 lookup_class_type_through_scopes(const std::list<string>&,
1358  const translation_unit&);
1359 
1360 union_decl_sptr
1361 lookup_union_type(const interned_string&, const translation_unit&);
1362 
1363 union_decl_sptr
1364 lookup_union_type(const interned_string&, const corpus&);
1365 
1366 union_decl_sptr
1367 lookup_union_type_per_location(const interned_string&, const corpus&);
1368 
1369 union_decl_sptr
1370 lookup_union_type_per_location(const string&, const corpus&);
1371 
1372 union_decl_sptr
1373 lookup_union_type(const string&, const corpus&);
1374 
1375 enum_type_decl_sptr
1377 
1378 enum_type_decl_sptr
1379 lookup_enum_type(const string&, const translation_unit&);
1380 
1381 enum_type_decl_sptr
1382 lookup_enum_type(const enum_type_decl&, const corpus&);
1383 
1384 enum_type_decl_sptr
1385 lookup_enum_type(const string&, const corpus&);
1386 
1387 enum_type_decl_sptr
1388 lookup_enum_type(const interned_string&, const corpus&);
1389 
1390 const type_base_wptrs_type*
1391 lookup_enum_types(const interned_string&, const corpus&);
1392 
1393 const type_base_wptrs_type*
1394 lookup_enum_types(const string&, const corpus&);
1395 
1396 enum_type_decl_sptr
1397 lookup_enum_type_per_location(const interned_string&, const corpus&);
1398 
1399 enum_type_decl_sptr
1400 lookup_enum_type_per_location(const string&, const corpus&);
1401 
1402 typedef_decl_sptr
1404 
1405 typedef_decl_sptr
1406 lookup_typedef_type(const typedef_decl&, const corpus&);
1407 
1408 typedef_decl_sptr
1409 lookup_typedef_type(const interned_string& type_name,
1410  const translation_unit& tu);
1411 
1412 typedef_decl_sptr
1413 lookup_typedef_type(const string& type_name, const translation_unit& tu);
1414 
1415 typedef_decl_sptr
1416 lookup_typedef_type(const interned_string&, const corpus&);
1417 
1418 typedef_decl_sptr
1419 lookup_typedef_type_per_location(const interned_string&, const corpus &);
1420 
1421 typedef_decl_sptr
1422 lookup_typedef_type_per_location(const string&, const corpus &);
1423 
1424 typedef_decl_sptr
1425 lookup_typedef_type(const string&, const corpus&);
1426 
1427 type_base_sptr
1428 lookup_class_or_typedef_type(const string&, const translation_unit&);
1429 
1430 type_base_sptr
1432 
1433 type_base_sptr
1434 lookup_class_or_typedef_type(const string&, const corpus&);
1435 
1436 type_base_sptr
1437 lookup_class_typedef_or_enum_type(const string&, const corpus&);
1438 
1439 qualified_type_def_sptr
1441 
1442 qualified_type_def_sptr
1443 lookup_qualified_type(const string&, const translation_unit&);
1444 
1445 qualified_type_def_sptr
1447 
1448 qualified_type_def_sptr
1449 lookup_qualified_type(const interned_string&, const corpus&);
1450 
1451 pointer_type_def_sptr
1453 
1454 pointer_type_def_sptr
1455 lookup_pointer_type(const string&, const translation_unit&);
1456 
1457 pointer_type_def_sptr
1458 lookup_pointer_type(const type_base_sptr& pointed_to_type,
1459  const translation_unit& tu);
1460 
1461 pointer_type_def_sptr
1463 
1464 pointer_type_def_sptr
1465 lookup_pointer_type(const interned_string&, const corpus&);
1466 
1467 const reference_type_def_sptr
1469 
1470 const reference_type_def_sptr
1471 lookup_reference_type(const string&, const translation_unit&);
1472 
1473 const reference_type_def_sptr
1474 lookup_reference_type(const type_base_sptr& pointed_to_type,
1475  bool lvalue_reference,
1476  const translation_unit& tu);
1477 
1478 reference_type_def_sptr
1480 
1481 reference_type_def_sptr
1482 lookup_reference_type(const interned_string&, const corpus&);
1483 
1484 array_type_def_sptr
1486 
1487 array_type_def_sptr
1488 lookup_array_type(const string&, const translation_unit&);
1489 
1490 array_type_def_sptr
1491 lookup_array_type(const array_type_def&, const corpus&);
1492 
1493 array_type_def_sptr
1494 lookup_array_type(const interned_string&, const corpus&);
1495 
1496 function_type_sptr
1497 lookup_function_type(const string&,
1498  const translation_unit&);
1499 
1500 function_type_sptr
1501 lookup_function_type(const interned_string&,
1502  const translation_unit&);
1503 
1504 function_type_sptr
1506  const translation_unit&);
1507 
1508 function_type_sptr
1509 lookup_function_type(const function_type_sptr&,
1510  const translation_unit&);
1511 
1512 function_type_sptr
1513 lookup_function_type(const function_type&, const corpus&);
1514 
1515 function_type_sptr
1516 lookup_function_type(const function_type_sptr&, const corpus&);
1517 
1518 function_type_sptr
1519 lookup_function_type(const function_type&, const corpus&);
1520 
1521 function_type_sptr
1522 lookup_function_type(const interned_string&, const corpus&);
1523 
1524 type_base_sptr
1525 lookup_type(const string&, const translation_unit&);
1526 
1527 const type_base_sptr
1528 lookup_type(const type_base_sptr, const translation_unit&);
1529 
1530 type_base_sptr
1531 lookup_type(const interned_string&, const corpus&);
1532 
1533 type_base_sptr
1534 lookup_type_per_location(const interned_string&, const corpus&);
1535 
1536 type_base_sptr
1537 lookup_type(const type_base&, const corpus&);
1538 
1539 type_base_sptr
1540 lookup_type(const type_base_sptr&, const corpus&);
1541 
1542 type_base_sptr
1543 lookup_type_through_scopes(const std::list<string>&,
1544  const translation_unit&);
1545 
1546 type_base_sptr
1547 lookup_type_through_translation_units(const string&, const corpus&);
1548 
1549 type_base_sptr
1550 lookup_type_from_translation_unit(const string& type_name,
1551  const string& tu_path,
1552  const corpus& corp);
1553 
1554 function_type_sptr
1555 lookup_or_synthesize_fn_type(const function_type_sptr&,
1556  const corpus&);
1557 
1558 type_base_sptr
1559 synthesize_type_from_translation_unit(const type_base_sptr&,
1560  translation_unit&);
1561 
1562 function_type_sptr
1564  translation_unit&);
1565 
1566 const type_base_sptr
1567 lookup_type_in_scope(const string&,
1568  const scope_decl_sptr&);
1569 
1570 const type_base_sptr
1571 lookup_type_in_scope(const std::list<string>&,
1572  const scope_decl_sptr&);
1573 
1574 const decl_base_sptr
1575 lookup_var_decl_in_scope(const string&,
1576  const scope_decl_sptr&);
1577 
1578 const decl_base_sptr
1579 lookup_var_decl_in_scope(const std::list<string>&,
1580  const scope_decl_sptr&);
1581 
1582 string
1583 demangle_cplus_mangled_name(const string&);
1584 
1585 type_base_sptr
1586 type_or_void(const type_base_sptr, const environment&);
1587 
1588 type_base_sptr
1589 canonicalize(type_base_sptr type, bool do_log= false, bool show_stats= false);
1590 
1591 type_base*
1592 type_has_non_canonicalized_subtype(type_base_sptr t);
1593 
1594 bool
1595 type_has_sub_type_changes(type_base_sptr t_v1,
1596  type_base_sptr t_v2);
1597 
1598 void
1599 keep_type_alive(type_base_sptr t);
1600 
1601 size_t
1602 hash_type(const type_base *t);
1603 
1604 size_t
1606 
1607 size_t
1608 hash_type_or_decl(const type_or_decl_base_sptr &);
1609 
1610 bool
1612 
1613 bool
1614 is_non_canonicalized_type(const type_base_sptr&);
1615 
1616 bool
1617 is_unique_type(const type_base_sptr&);
1618 
1619 bool
1620 is_unique_type(const type_base*);
1621 
1622 /// For a given type, return its exemplar type.
1623 ///
1624 /// For a given type, its exemplar type is either its canonical type
1625 /// or the canonical type of the definition type of a given
1626 /// declaration-only type. If the neither of those two types exist,
1627 /// then the exemplar type is the given type itself.
1628 ///
1629 /// @param type the input to consider.
1630 ///
1631 /// @return the exemplar type.
1632 type_base*
1633 get_exemplar_type(const type_base* type);
1634 
1635 bool
1637 
1638 bool
1639 types_have_similar_structure(const type_base_sptr& first,
1640  const type_base_sptr& second,
1641  bool indirect_type = false);
1642 
1643 bool
1645  const type_base* second,
1646  bool indirect_type = false);
1647 
1648 string
1650  bool is_anonymous,
1651  uint64_t size);
1652 
1653 var_decl_sptr
1655  const regex::regex_t_sptr& r);
1656 
1657 var_decl_sptr
1659  const regex::regex_t_sptr& regex);
1660 
1661 bool
1663 
1664 bool
1665 decl_name_changed(const type_or_decl_base_sptr& d1,
1666  const type_or_decl_base_sptr& d2);
1667 
1668 bool
1669 integral_type_has_harmless_name_change(const decl_base_sptr& f,
1670  const decl_base_sptr& s);
1671 
1672 bool
1673 integral_type_has_harmless_name_change(const type_base_sptr& f,
1674  const type_base_sptr& s);
1675 } // end namespace ir
1676 
1677 using namespace abigail::ir;
1678 
1679 namespace suppr
1680 {
1682 
1683 /// Convenience typedef for a shared pointer to a @ref suppression.
1684 typedef shared_ptr<suppression_base> suppression_sptr;
1685 
1686 /// Convenience typedef for a vector of @ref suppression_sptr
1687 typedef vector<suppression_sptr> suppressions_type;
1688 
1689 } // end namespace suppr
1690 
1691 namespace symtab_reader
1692 {
1693 
1694 class symtab;
1695 /// Convenience typedef for a shared pointer to a @ref symtab
1696 typedef std::shared_ptr<symtab> symtab_sptr;
1697 
1698 } // end namespace symtab_reader
1699 
1700 void
1701 dump(const decl_base_sptr, std::ostream&);
1702 
1703 void
1704 dump(const decl_base_sptr);
1705 
1706 void
1707 dump(const type_base_sptr, std::ostream&);
1708 
1709 void
1710 dump(const type_base_sptr);
1711 
1712 void
1713 dump(const var_decl_sptr, std::ostream&);
1714 
1715 void
1716 dump(const var_decl_sptr);
1717 
1718 void
1719 dump(const translation_unit&, std::ostream&);
1720 
1721 void
1722 dump(const translation_unit&);
1723 
1724 void
1725 dump(const translation_unit_sptr, std::ostream&);
1726 
1727 void
1729 
1730 void
1732 
1733 void
1735 
1736 void
1737 dump_decl_location(const decl_base_sptr&);
1738 
1739 #ifndef ABG_ASSERT
1740 /// This is a wrapper around the 'assert' glibc call. It allows for
1741 /// its argument to have side effects, so that it keeps working when
1742 /// the code of libabigail is compiled with the NDEBUG macro defined.
1743 #define ABG_ASSERT(cond) do {({bool __abg_cond__ = bool(cond); assert(__abg_cond__); !!__abg_cond__;});} while (false)
1744 #endif
1745 
1746 } // end namespace abigail
1747 #endif // __ABG_IRFWD_H__
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:9041
void remove_decl_from_scope(decl_base_sptr decl)
Remove a given decl from its scope.
Definition: abg-ir.cc:8475
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:8450
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:9805
bool is_type(const type_or_decl_base &tod)
Test whether a declaration is a type.
Definition: abg-ir.cc:10807
The abstraction of an array type.
Definition: abg-ir.h:2547
bool get_member_function_is_virtual(const function_decl &f)
Test if a given member function is virtual.
Definition: abg-ir.cc:6641
The base type of all declarations.
Definition: abg-ir.h:1584
vector< class_decl_sptr > classes_type
Convenience typedef for a vector of class_decl_sptr.
Definition: abg-fwd.h:196
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:12335
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:5718
The abstraction of a change between two ABI artifacts, a.k.a an artifact change.
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:11349
vector< type_base_wptr > type_base_wptrs_type
A convenience typedef for a vector of type_base_wptr.
Definition: abg-fwd.h:142
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:7511
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:28457
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:139
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:12445
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:10909
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:8732
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:4884
Abstracts a member class template template.
Definition: abg-ir.h:4699
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:8494
shared_ptr< suppression_base > suppression_sptr
Convenience typedef for a shared pointer to a suppression.
Definition: abg-fwd.h:1681
A type that introduces a scope.
Definition: abg-ir.h:2183
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:9208
bool is_data_member(const var_decl &v)
Test if a var_decl is a data member.
Definition: abg-ir.cc:5613
bool is_class_type(const type_or_decl_base &t)
Test whether a type is a class.
Definition: abg-ir.cc:11165
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:11417
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:12628
shared_ptr< function_type > function_type_sptr
Convenience typedef for a shared pointer on a function_type.
Definition: abg-fwd.h:208
bool is_member_function(const function_decl &f)
Test whether a function_decl is a member function.
Definition: abg-ir.cc:6368
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:11554
An abstraction helper for type declarations.
Definition: abg-ir.h:2002
shared_ptr< method_type > method_type_sptr
Convenience typedef for shared pointer to method_type.
Definition: abg-fwd.h:218
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:10091
This is the abstraction of a set of translation units (themselves seen as bundles of unitary abi arte...
Definition: abg-corpus.h:24
weak_ptr< function_type > function_type_wptr
Convenience typedef for a weak pointer on a function_type.
Definition: abg-fwd.h:216
translation_unit * get_translation_unit(const type_or_decl_base &t)
Return the translation unit a declaration belongs to.
Definition: abg-ir.cc:10503
The base class of both types and declarations.
Definition: abg-ir.h:1405
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:12714
A declaration that introduces a scope.
Definition: abg-ir.h:1852
const location & get_artificial_or_natural_location(const decl_base *decl)
Get the artificial location of a decl.
Definition: abg-ir.cc:10071
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:10650
weak_ptr< typedef_decl > typedef_decl_wptr
Convenience typedef for a weak pointer on a typedef_decl.
Definition: abg-fwd.h:170
Abstracts a reference type.
Definition: abg-ir.h:2415
The abstraction of a qualified type.
Definition: abg-ir.h:2235
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:11787
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:11858
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:28473
The base class of templates.
Definition: abg-ir.h:3566
bool is_const_qualified_type(const qualified_type_def_sptr &t)
Test if a given qualified type is const.
Definition: abg-ir.cc:7301
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:7117
This is the abstraction of the set of relevant artefacts (types, variable declarations, functions, templates, etc) bundled together into a translation unit.
Definition: abg-ir.h:694
shared_ptr< diff_context > diff_context_sptr
Convenience typedef for a shared pointer of diff_context.
Definition: abg-fwd.h:67
ssize_t get_member_function_vtable_offset(const function_decl &f)
Get the vtable offset of a member function.
Definition: abg-ir.cc:6578
A functor to hash instances of interned_string.
bool is_user_defined_type(const type_base *t)
Test if a type is user-defined.
Definition: abg-ir.cc:5479
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:12820
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:15271
Abstracts the type of a class member function.
Definition: abg-ir.h:3505
shared_ptr< var_decl > var_decl_sptr
Convenience typedef for a shared pointer on a var_decl.
Definition: abg-fwd.h:253
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:6538
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:9508
bool is_member_decl(const decl_base_sptr d)
Tests if a declaration is a class member.
Definition: abg-ir.cc:5417
const global_scope * get_global_scope(const decl_base &decl)
return the global scope as seen by a given declaration.
Definition: abg-ir.cc:8543
uint64_t get_absolute_data_member_offset(const var_decl &m)
Get the absolute offset of a data member.
Definition: abg-ir.cc:6273
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:11711
type_decl * is_integral_type(const type_or_decl_base *t)
Test if a type is an integral type.
Definition: abg-ir.cc:10967
Abstraction of the declaration of a method.
Definition: abg-ir.h:3886
const location & get_natural_or_artificial_location(const decl_base *decl)
Get the non-artificial (natural) location of a decl.
Definition: abg-ir.cc:10052
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:11396
decl_base * is_decl_slow(const type_or_decl_base *t)
Test if an ABI artifact is a declaration.
Definition: abg-ir.cc:10787
shared_ptr< translation_unit > translation_unit_sptr
Convenience typedef for a shared pointer on a translation_unit type.
Definition: abg-fwd.h:133
Abstracts a class declaration.
Definition: abg-ir.h:4173
shared_ptr< typedef_decl > typedef_decl_sptr
Convenience typedef for a shared pointer on a typedef_decl.
Definition: abg-fwd.h:164
bool is_at_global_scope(const decl_base &decl)
Tests whether a given declaration is at global scope.
Definition: abg-ir.cc:10580
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:11536
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:28849
size_t hash_type(const type_base *t)
Hash an ABI artifact that is a type.
Definition: abg-ir.cc:28585
const scope_decl * is_scope_decl(const decl_base *d)
Test if a declaration is a scope_decl.
Definition: abg-ir.cc:5445
Abstraction of a member function context relationship. This relates a member function to its parent c...
Definition: abg-ir.h:4496
Declaration of types pertaining to the interned string pool used throughout Libabigail, for performance reasons.
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:6030
shared_ptr< type_composition > type_composition_sptr
Convenience typedef for shared pointer to type_composition.
Definition: abg-fwd.h:343
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:157
Abstracts a variable declaration.
Definition: abg-ir.h:3067
Abstract a class template.
Definition: abg-ir.h:3796
bool get_member_function_is_dtor(const function_decl &f)
Test whether a member function is a destructor.
Definition: abg-ir.cc:6454
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:29165
Abstract a member function template.
Definition: abg-ir.h:4646
Abstracts a type template parameter.
Definition: abg-ir.h:3627
var_decl * is_var_decl(const type_or_decl_base *tod)
Tests if a declaration is a variable declaration.
Definition: abg-ir.cc:12059
weak_ptr< var_decl > var_decl_wptr
Convenience typedef for a weak pointer on a var_decl.
Definition: abg-fwd.h:259
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:12522
weak_ptr< decl_base > decl_base_wptr
Convenience typedef for a weak pointer to a decl_base.
Definition: abg-fwd.h:181
bool is_non_canonicalized_type(const type_base *t)
Test if a given type is allowed to be non canonicalized.
Definition: abg-ir.cc:28634
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:10207
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:6915
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:13681
weak_ptr< type_base > type_base_wptr
Convenience typedef for a weak pointer on a type_base.
Definition: abg-fwd.h:128
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:5990
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:13585
bool integral_type_has_harmless_name_change(const type_base_sptr &f, const type_base_sptr &s)
Test if a diff node carries a change whereby two integral types have different names in a harmless wa...
Definition: abg-ir.cc:29776
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:5742
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:12891
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:14213
bool is_unique_type(const type_base_sptr &t)
Test if a type is unique in the entire environment.
Definition: abg-ir.cc:28670
Abstracts a declaration for an enum type.
Definition: abg-ir.h:2784
typedef_decl_sptr is_typedef(const type_or_decl_base_sptr t)
Test whether a type is a typedef.
Definition: abg-ir.cc:11011
type_base * get_exemplar_type(const type_base *type)
For a given type, return its exemplar type.
Definition: abg-ir.cc:28705
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:13560
uint64_t get_data_member_offset(const var_decl &m)
Get the offset of a data member.
Definition: abg-ir.cc:6184
void set_member_function_virtuality(function_decl &fn, bool is_virtual, ssize_t voffset)
Set the virtual-ness of a member fcuntion.
Definition: abg-ir.cc:6715
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:9684
Toplevel namespace for libabigail.
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:237
void set_member_function_is_dtor(function_decl &f, bool d)
Set the destructor-ness property of a member function.
Definition: abg-ir.cc:6482
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:28435
shared_ptr< scope_decl > scope_decl_sptr
Convenience typedef for a shared pointer on a scope_decl.
Definition: abg-fwd.h:261
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:6425
shared_ptr< function_decl > function_decl_sptr
Convenience typedef for a shared pointer on a function_decl.
Definition: abg-fwd.h:266
decl_base * is_decl(const type_or_decl_base *d)
Test if an ABI artifact is a declaration.
Definition: abg-ir.cc:10747
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:11100
shared_ptr< template_tparameter > template_tparameter_sptr
Convenience typedef for a shared_ptr to template_tparameter.
Definition: abg-fwd.h:324
Abstracts a union type declaration.
Definition: abg-ir.h:4421
The abstraction of a pointer-to-member type.
Definition: abg-ir.h:2483
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:28498
shared_ptr< function_tdecl > function_tdecl_sptr
Convenience typedef for a shared pointer on a function_tdecl.
Definition: abg-fwd.h:291
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:10607
shared_ptr< environment > environment_sptr
Convenience typedef for a shared pointer to an environment.
Definition: abg-fwd.h:111
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:12590
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:11519
const enum_type_decl * is_compatible_with_enum_type(const type_base *t)
Test if a type is an enum. This function looks through typedefs.
Definition: abg-ir.cc:11051
Abstraction for a function declaration.
Definition: abg-ir.h:3164
typedef_decl_sptr clone_typedef(const typedef_decl_sptr &t)
Clone a typedef type.
Definition: abg-ir.cc:7590
qualified_type_def_sptr clone_qualified_type(const qualified_type_def_sptr &t)
Clone a qualifiend type.
Definition: abg-ir.cc:7615
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:12096
string get_debug_representation(const type_or_decl_base *artifact)
Get the textual representation of a type for debugging purposes.
Definition: abg-ir.cc:9833
vector< class_or_union_sptr > classes_or_unions_type
Convenience typedef for a vector of class_or_union_sptr.
Definition: abg-fwd.h:199
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:14056
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:14188
The context of the diff. This type holds various bits of information that is going to be used through...
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:11276
The base type of class_decl and union_decl.
Definition: abg-ir.h:3976
const decl_base * get_type_declaration(const type_base *t)
Get the declaration for a given type.
Definition: abg-ir.cc:10229
const type_base * peel_qualified_type(const type_base *type)
Return the leaf underlying type of a qualified type.
Definition: abg-ir.cc:7264
The source location of a token.
Definition: abg-ir.h:306
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:8587
The base of an entity of the intermediate representation that is to be traversed. ...
Definition: abg-ir.h:469
weak_ptr< class_decl > class_decl_wptr
Convenience typedef for a weak pointer on a class_decl.
Definition: abg-fwd.h:202
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:118
shared_ptr< type_decl > type_decl_sptr
Convenience typedef for a shared pointer on a type_decl.
Definition: abg-fwd.h:159
Abstracts non type template parameters.
Definition: abg-ir.h:3661
location get_location(const type_base_sptr &type)
Get the location of the declaration of a given type.
Definition: abg-ir.cc:8766
void set_member_is_static(decl_base &d, bool s)
Sets the static-ness property of a class member.
Definition: abg-ir.cc:26893
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:148
type_base * look_through_decl_only_type(type_base *t)
If a type is is decl-only, then get its definition. Otherwise, just return the initial type...
Definition: abg-ir.cc:12027
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:10024
This is an abstraction of the set of resources necessary to manage several aspects of the internal re...
Definition: abg-ir.h:147
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:12668
Abstract a function template declaration.
Definition: abg-ir.h:3751
The abstraction for a data member context relationship. This relates a data member to its parent clas...
Definition: abg-ir.h:3002
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:6229
weak_ptr< corpus > corpus_wptr
Convenience typedef for a weak pointer to a corpus.
Definition: abg-fwd.h:131
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:11967
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:13610
shared_ptr< reference_type_def > reference_type_def_sptr
Convenience typedef for a shared pointer on a reference_type_def.
Definition: abg-fwd.h:232
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:12194
type_base_sptr canonicalize(type_base_sptr t, bool do_log, bool show_stats)
Compute the canonical type of a given type.
Definition: abg-ir.cc:16251
std::shared_ptr< regex_t > regex_t_sptr
A convenience typedef for a shared pointer of regex_t.
Definition: abg-fwd.h:87
Base type of a direct suppression specifications types.
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:275
bool get_data_member_is_laid_out(const var_decl &m)
Test whether a data member is laid out.
Definition: abg-ir.cc:6344
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:7333
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:9118
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:7358
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:29190
vector< suppression_sptr > suppressions_type
Convenience typedef for a vector of suppression_sptr.
Definition: abg-fwd.h:1687
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:14518
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:11948
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, get its pretty representation.
Definition: abg-ir.cc:9180
type_decl * is_real_type(const type_or_decl_base *t)
Test if a type is a real type.
Definition: abg-ir.cc:10927
bool is_union_type(const type_or_decl_base &t)
Test if a type is a union_decl.
Definition: abg-ir.cc:11445
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:12123
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:29211
function_decl * is_function_decl(const type_or_decl_base *d)
Test whether a declaration is a function_decl.
Definition: abg-ir.cc:10695
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:6780
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:15458
const type_base_sptr peel_array_type(const type_base_sptr &type)
Return the leaf element type of an array.
Definition: abg-ir.cc:7222
shared_ptr< dm_context_rel > dm_context_rel_sptr
A convenience typedef for a shared pointer to dm_context_rel.
Definition: abg-fwd.h:248
bool is_anonymous_type(const type_base *t)
Test whether a declaration is a type.
Definition: abg-ir.cc:10858
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:12776
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:11571
bool is_template_parameter(const shared_ptr< decl_base > decl)
Tests whether a decl is a template parameter.
Definition: abg-ir.cc:10681
The abstraction of a pointer type.
Definition: abg-ir.h:2349
shared_ptr< class_tdecl > class_tdecl_sptr
Convenience typedef for a shared pointer on a class_tdecl.
Definition: abg-fwd.h:286
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:13320
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:14026
scope_decl * get_type_scope(type_base *t)
Get the scope of a given type.
Definition: abg-ir.cc:8800
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:10894
shared_ptr< namespace_decl > namespace_decl_sptr
Convenience typedef for a shared pointer on namespace_decl.
Definition: abg-fwd.h:281
bool get_member_function_is_ctor(const function_decl &f)
Test whether a member function is a constructor.
Definition: abg-ir.cc:6395
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:6154
The base class for the visitor type hierarchy used for traversing a translation unit.
Definition: abg-ir.h:4810
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:5815
A basic type declaration that introduces no scope.
Definition: abg-ir.h:2117
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:13844
shared_ptr< enum_type_decl > enum_type_decl_sptr
Convenience typedef for shared pointer to a enum_type_decl.
Definition: abg-fwd.h:172
string demangle_cplus_mangled_name(const string &mangled_name)
Demangle a C++ mangled name and return the resulting string.
Definition: abg-ir.cc:15428
shared_ptr< class_decl > class_decl_sptr
Convenience typedef for a shared pointer on a class_decl.
Definition: abg-fwd.h:190
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:5024
vector< enum_type_decl_sptr > enums_type
Convenience typedef for a vector of enum_type_decl_sptr.
Definition: abg-fwd.h:178
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:12975
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:8835
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:11838
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:12485
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:11614
shared_ptr< ir_traversable_base > ir_traversable_base_sptr
Convenience typedef for a shared pointer to ir_traversable_base.
Definition: abg-fwd.h:105
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:8686
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:12110
bool is_template_decl(const decl_base_sptr &decl)
Tests whether a decl is a template.
Definition: abg-ir.cc:12238
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:28797
uint64_t get_var_size_in_bits(const var_decl_sptr &v)
Get the size of a given variable.
Definition: abg-ir.cc:6316
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:12958
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:12840
bool is_at_template_scope(const shared_ptr< decl_base > decl)
Tests whether a given decl is at template scope.
Definition: abg-ir.cc:10672
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:10142
vector< function_type_sptr > function_types_type
Convenience typedef fo a vector of function_type_sptr.
Definition: abg-fwd.h:213
This abstracts the global scope of a given translation unit.
Definition: abg-ir.h:1981
shared_ptr< non_type_tparameter > non_type_tparameter_sptr
Convenience typedef for shared pointer to non_type_template_parameter.
Definition: abg-fwd.h:316
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:12555
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:5575
The abstraction of an interned string.
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:13889
bool classes_have_same_layout(const type_base_sptr &f, const type_base_sptr &s)
Test if two classes have the same layout.
Definition: abg-ir.cc:10262
bool get_member_function_is_const(const function_decl &f)
Test whether a member function is const.
Definition: abg-ir.cc:6510
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, reference_type_def, or array_type_def node.
Definition: abg-ir.cc:7409
namespace_decl_sptr is_namespace(const decl_base_sptr &d)
Tests if a declaration is a namespace declaration.
Definition: abg-ir.cc:12078
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:7173
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:7038
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:14151
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:6567
const class_decl * is_compatible_with_class_type(const type_base *t)
Test if a type is a class. This function looks through typedefs.
Definition: abg-ir.cc:11118
bool types_are_compatible(const type_base_sptr type1, const type_base_sptr type2)
Test if two types are equal modulo a typedef or CV qualifiers.
Definition: abg-ir.cc:10397
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:11918
weak_ptr< diff_context > diff_context_wptr
Convenience typedef for a weak pointer of diff_context.
Definition: abg-fwd.h:73
Abstracts a template template parameter.
Definition: abg-ir.h:3694
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:9019
Abstraction of a group of corpora.
Definition: abg-corpus.h:385
array_type_def_sptr clone_array(const array_type_def_sptr &array)
Clone an array type.
Definition: abg-ir.cc:7548
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:6114
bool is_anonymous_data_member(const decl_base &d)
Test if a decl is an anonymous data member.
Definition: abg-ir.cc:5872
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:12309
shared_ptr< template_decl > template_decl_sptr
Convenience typedef for a shared pointer to template_decl.
Definition: abg-fwd.h:303
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:6330
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:5781
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:13793
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:11591
shared_ptr< template_parameter > template_parameter_sptr
Convenience typedef for shared pointer to template parameter.
Definition: abg-fwd.h:311
bool is_global_scope(const scope_decl &scope)
Tests whether if a given scope is the global scope.
Definition: abg-ir.cc:10552
bool has_scope(const decl_base &d)
Tests if a declaration has got a scope.
Definition: abg-ir.cc:5399
The abstraction of a typedef declaration.
Definition: abg-ir.h:2934
This abstracts a composition of types based on template type parameters. The result of the compositio...
Definition: abg-ir.h:3729
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:13813
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:7668
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:11651
shared_ptr< diff > diff_sptr
Convenience typedef for a shared_ptr for the diff class.
Definition: abg-fwd.h:75
bool decl_name_changed(const type_or_decl_base *a1, const type_or_decl_base *a2)
Test if two decls have different names.
Definition: abg-ir.cc:29735
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:6058
Base class for a template parameter. Client code should use the more specialized type_template_parame...
Definition: abg-ir.h:3598
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:10192
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:11206
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:6167
shared_ptr< global_scope > global_scope_sptr
Convenience typedef for shared pointer on global_scope.
Definition: abg-fwd.h:296
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:15354
shared_ptr< array_type_def > array_type_def_sptr
Convenience typedef for a shared pointer on a array_type_def.
Definition: abg-fwd.h:241
shared_ptr< pointer_type_def > pointer_type_def_sptr
Convenience typedef for a shared pointer on a pointer_type_def.
Definition: abg-fwd.h:223
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:11888
bool base_name(string const &path, string &file_name)
Return the file name part of a file part.
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:11479
The namespace of the internal representation of ABI artifacts like types and decls.
shared_ptr< type_tparameter > type_tparameter_sptr
Convenience typedef for a shared pointer to type_tparameter.
Definition: abg-fwd.h:330
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:7063
string get_pretty_representation(diff *d)
Get a copy of the pretty representation of a diff node.
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:11750
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:12156
weak_ptr< diff > diff_wptr
Convenience typedef for a weak_ptr for the diff class.
Definition: abg-fwd.h:81
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:13252
Abstraction of a function type.
Definition: abg-ir.h:3419
weak_ptr< template_decl > template_decl_wptr
Convenience typedef for a weak pointer to template_decl.
Definition: abg-fwd.h:309
The entry point to manage locations.
Definition: abg-ir.h:448
bool is_member_type(const type_base_sptr &t)
Tests if a type is a class member.
Definition: abg-ir.cc:5464
The abstraction of a namespace declaration.
Definition: abg-ir.h:2206