[2/5] XML writer: use exemplar types for tracking referenced types

Message ID 20211203114622.2944173-3-maennich@google.com
State New
Headers
Series Improvements for the XML Writer |

Commit Message

Matthias Männich Dec. 3, 2021, 11:46 a.m. UTC
  The emitted type sets are used with some referenced type sets (which use
bare type pointers). To keep consistency between what is being recorded
in each set, switch to storing exemplar type pointers in the referenced
type sets.

This change results in the omission of a small number of duplicate
types from various test cases. In each case the duplicates were
previously caused by a referenced type being emitted for one
translation unit and then the same type being emitted as a canonical
type for a later translation unit.

It also causes the movement of some function types in some test cases.
Some of those types are now considered referenced and appear earlier as
a result.

	* src/abg-writer.cc (record_type_as_referenced): Use preferred
	type with referenced type sets.
	(type_is_referenced): Likewise.
	(tests/data/test-annotate/test14-pr18893.so.abi): Duplicate
	type(s) removed, as described above.
	(tests/data/test-read-dwarf/test14-pr18893.so.abi): Likewise.
	(tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi):
	Likewise.
	(tests/data/test-read-dwarf/test16-pr18904.so.abi): Likewise.
	(tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi):
	Likewise.
	(tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi):
	Likewise.
	(tests/data/test-read-dwarf/PR25007-sdhci.ko.abi): Some
	function type(s) reordered, as described above.
	(tests/data/test-read-dwarf/PR25042-libgdbm-clang-dwarf5.so.6.0.0.abi):
	Likewise.
	(tests/data/test-annotate/test15-pr18892.so.abi):: Duplicate
	type(s) removed and some function type(s) reordered, as
	described above.
	(tests/data/test-read-dwarf/test15-pr18892.so.abi): Likewise.
	(tests/data/test-annotate/test21-pr19092.so.abi): Likewise.
	(tests/data/test-read-dwarf/test21-pr19092.so.abi): Likewise

Reviewed-by: Giuliano Procida <gprocida@google.com>
Signed-off-by: Matthias Maennich <maennich@google.com>
---
 src/abg-writer.cc                             |  19 +-
 .../data/test-annotate/test14-pr18893.so.abi  |   2 -
 .../data/test-annotate/test15-pr18892.so.abi  |  44 +-
 ...19-pr19023-libtcmalloc_and_profiler.so.abi |   4 -
 .../data/test-annotate/test21-pr19092.so.abi  |  26 +-
 .../data/test-read-dwarf/PR25007-sdhci.ko.abi | 434 +++++++++---------
 .../PR25042-libgdbm-clang-dwarf5.so.6.0.0.abi |   2 +-
 .../test-read-dwarf/test14-pr18893.so.abi     |   1 -
 .../test-read-dwarf/test15-pr18892.so.abi     |  28 +-
 .../test-read-dwarf/test16-pr18904.so.abi     |   2 -
 ...19-pr19023-libtcmalloc_and_profiler.so.abi |   2 -
 .../test-read-dwarf/test21-pr19092.so.abi     |  16 +-
 .../test22-pr19097-libstdc++.so.6.0.17.so.abi |   1 -
 13 files changed, 279 insertions(+), 302 deletions(-)
  

Comments

Dodji Seketeli Dec. 10, 2021, 10:42 a.m. UTC | #1
Matthias Maennich <maennich@google.com> a écrit:

> The emitted type sets are used with some referenced type sets (which use
> bare type pointers). To keep consistency between what is being recorded
> in each set, switch to storing exemplar type pointers in the referenced
> type sets.
>
> This change results in the omission of a small number of duplicate
> types from various test cases. In each case the duplicates were
> previously caused by a referenced type being emitted for one
> translation unit and then the same type being emitted as a canonical
> type for a later translation unit.
>
> It also causes the movement of some function types in some test cases.
> Some of those types are now considered referenced and appear earlier as
> a result.
>
> 	* src/abg-writer.cc (record_type_as_referenced): Use preferred
> 	type with referenced type sets.
> 	(type_is_referenced): Likewise.
> 	(tests/data/test-annotate/test14-pr18893.so.abi): Duplicate
> 	type(s) removed, as described above.
> 	(tests/data/test-read-dwarf/test14-pr18893.so.abi): Likewise.
> 	(tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi):
> 	Likewise.
> 	(tests/data/test-read-dwarf/test16-pr18904.so.abi): Likewise.
> 	(tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi):
> 	Likewise.
> 	(tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi):
> 	Likewise.
> 	(tests/data/test-read-dwarf/PR25007-sdhci.ko.abi): Some
> 	function type(s) reordered, as described above.
> 	(tests/data/test-read-dwarf/PR25042-libgdbm-clang-dwarf5.so.6.0.0.abi):
> 	Likewise.
> 	(tests/data/test-annotate/test15-pr18892.so.abi):: Duplicate
> 	type(s) removed and some function type(s) reordered, as
> 	described above.
> 	(tests/data/test-read-dwarf/test15-pr18892.so.abi): Likewise.
> 	(tests/data/test-annotate/test21-pr19092.so.abi): Likewise.
> 	(tests/data/test-read-dwarf/test21-pr19092.so.abi): Likewise
>
> Reviewed-by: Giuliano Procida <gprocida@google.com>
> Signed-off-by: Matthias Maennich <maennich@google.com>

Applied to master, thanks!

[...]

Cheers,
  

Patch

diff --git a/src/abg-writer.cc b/src/abg-writer.cc
index 9c3ae6f8d5b4..4cf2a7fb16af 100644
--- a/src/abg-writer.cc
+++ b/src/abg-writer.cc
@@ -542,18 +542,19 @@  public:
   ///
   /// @param t a shared pointer to a type
   void
-  record_type_as_referenced(const type_base_sptr& t)
+  record_type_as_referenced(const type_base_sptr& type)
   {
+    type_base* t = get_preferred_type(type.get());
     // If the type is a function type, record it in a dedicated data
     // structure.
-    if (function_type* f = is_function_type(t.get()))
+    if (function_type* f = is_function_type(t))
       m_referenced_fn_types_set.insert(f);
     else if (!t->get_naked_canonical_type())
       // If the type doesn't have a canonical type, record it in a
       // dedicated data structure.
-      m_referenced_non_canonical_types_set.insert(t.get());
+      m_referenced_non_canonical_types_set.insert(t);
     else
-      m_referenced_types_set.insert(t.get());
+      m_referenced_types_set.insert(t);
   }
 
   /// Test if a given type has been referenced by a pointer, a
@@ -564,17 +565,17 @@  public:
   /// @return true if the type has been referenced, false
   /// otherwise.
   bool
-  type_is_referenced(const type_base_sptr& t)
+  type_is_referenced(const type_base_sptr& type)
   {
-    if (function_type *f = is_function_type(t.get()))
+    type_base* t = get_preferred_type(type.get());
+    if (function_type* f = is_function_type(t))
       return (m_referenced_fn_types_set.find(f)
 	      != m_referenced_fn_types_set.end());
     else if (!t->get_naked_canonical_type())
-      return (m_referenced_non_canonical_types_set.find(t.get())
+      return (m_referenced_non_canonical_types_set.find(t)
 	      != m_referenced_non_canonical_types_set.end());
     else
-      return m_referenced_types_set.find
-	(t.get()) != m_referenced_types_set.end();
+      return m_referenced_types_set.find(t) != m_referenced_types_set.end();
   }
 
   /// A comparison functor to compare pointers to @ref type_base.
diff --git a/tests/data/test-annotate/test14-pr18893.so.abi b/tests/data/test-annotate/test14-pr18893.so.abi
index a5c30fb5b37d..2bcb3c519e20 100644
--- a/tests/data/test-annotate/test14-pr18893.so.abi
+++ b/tests/data/test-annotate/test14-pr18893.so.abi
@@ -965,8 +965,6 @@ 
       <!-- void -->
       <return type-id='type-id-14'/>
     </function-type>
-    <!-- unsigned long int -->
-    <type-decl name='unsigned long int' size-in-bits='64' id='type-id-3'/>
   </abi-instr>
   <abi-instr address-size='64' path='libnurbs/interface/glinterface.cc' comp-dir-path='/tmp/legendre/spack-stage/spack-stage-T0fsxk/Mesa-8.0.5/src/glu/sgi' language='LANG_C_plus_plus'>
     <!-- struct GLUnurbs -->
diff --git a/tests/data/test-annotate/test15-pr18892.so.abi b/tests/data/test-annotate/test15-pr18892.so.abi
index fbfa1da1a48a..582951a9f325 100644
--- a/tests/data/test-annotate/test15-pr18892.so.abi
+++ b/tests/data/test-annotate/test15-pr18892.so.abi
@@ -3302,42 +3302,38 @@ 
       <!-- void* -->
       <return type-id='type-id-1'/>
     </function-decl>
-    <!-- backtrace_state* -->
-    <pointer-type-def type-id='type-id-7' size-in-bits='64' id='type-id-22'/>
-    <!-- int (backtrace_state*, uintptr_t, backtrace_full_callback, backtrace_error_callback, void*) -->
-    <function-type size-in-bits='64' id='type-id-20'>
+    <!-- void (backtrace_state*, uintptr_t, backtrace_syminfo_callback, backtrace_error_callback, void*) -->
+    <function-type size-in-bits='64' id='type-id-21'>
       <!-- parameter of type 'backtrace_state*' -->
       <parameter type-id='type-id-22'/>
       <!-- parameter of type 'typedef uintptr_t' -->
       <parameter type-id='type-id-23'/>
-      <!-- parameter of type 'typedef backtrace_full_callback' -->
+      <!-- parameter of type 'typedef backtrace_syminfo_callback' -->
       <parameter type-id='type-id-27'/>
       <!-- parameter of type 'typedef backtrace_error_callback' -->
       <parameter type-id='type-id-24'/>
       <!-- parameter of type 'void*' -->
       <parameter type-id='type-id-1'/>
-      <!-- int -->
-      <return type-id='type-id-8'/>
+      <!-- void -->
+      <return type-id='type-id-25'/>
     </function-type>
-    <!-- void (backtrace_state*, uintptr_t, backtrace_syminfo_callback, backtrace_error_callback, void*) -->
-    <function-type size-in-bits='64' id='type-id-21'>
+    <!-- int (backtrace_state*, uintptr_t, backtrace_full_callback, backtrace_error_callback, void*) -->
+    <function-type size-in-bits='64' id='type-id-20'>
       <!-- parameter of type 'backtrace_state*' -->
       <parameter type-id='type-id-22'/>
       <!-- parameter of type 'typedef uintptr_t' -->
       <parameter type-id='type-id-23'/>
-      <!-- parameter of type 'typedef backtrace_syminfo_callback' -->
+      <!-- parameter of type 'typedef backtrace_full_callback' -->
       <parameter type-id='type-id-28'/>
       <!-- parameter of type 'typedef backtrace_error_callback' -->
       <parameter type-id='type-id-24'/>
       <!-- parameter of type 'void*' -->
       <parameter type-id='type-id-1'/>
-      <!-- void -->
-      <return type-id='type-id-25'/>
+      <!-- int -->
+      <return type-id='type-id-8'/>
     </function-type>
-    <!-- int (void*, void*)* -->
-    <pointer-type-def type-id='type-id-29' size-in-bits='64' id='type-id-12'/>
     <!-- int (void*, uintptr_t, const char*, int, const char*) -->
-    <function-type size-in-bits='64' id='type-id-30'>
+    <function-type size-in-bits='64' id='type-id-29'>
       <!-- parameter of type 'void*' -->
       <parameter type-id='type-id-1'/>
       <!-- parameter of type 'typedef uintptr_t' -->
@@ -3352,7 +3348,7 @@ 
       <return type-id='type-id-8'/>
     </function-type>
     <!-- int (void*, void*) -->
-    <function-type size-in-bits='64' id='type-id-29'>
+    <function-type size-in-bits='64' id='type-id-30'>
       <!-- parameter of type 'void*' -->
       <parameter type-id='type-id-1'/>
       <!-- parameter of type 'void*' -->
@@ -3417,7 +3413,7 @@ 
       <!-- parameter of type 'typedef uintptr_t' -->
       <parameter type-id='type-id-23' name='pc' filepath='../../.././libsanitizer/libbacktrace/../../libbacktrace/fileline.c' line='166' column='1'/>
       <!-- parameter of type 'typedef backtrace_full_callback' -->
-      <parameter type-id='type-id-27' name='callback' filepath='../../.././libsanitizer/libbacktrace/../../libbacktrace/fileline.c' line='167' column='1'/>
+      <parameter type-id='type-id-28' name='callback' filepath='../../.././libsanitizer/libbacktrace/../../libbacktrace/fileline.c' line='167' column='1'/>
       <!-- parameter of type 'typedef backtrace_error_callback' -->
       <parameter type-id='type-id-24' name='error_callback' filepath='../../.././libsanitizer/libbacktrace/../../libbacktrace/fileline.c' line='168' column='1'/>
       <!-- parameter of type 'void*' -->
@@ -3432,7 +3428,7 @@ 
       <!-- parameter of type 'typedef uintptr_t' -->
       <parameter type-id='type-id-23' name='pc' filepath='../../.././libsanitizer/libbacktrace/../../libbacktrace/fileline.c' line='182' column='1'/>
       <!-- parameter of type 'typedef backtrace_syminfo_callback' -->
-      <parameter type-id='type-id-28' name='callback' filepath='../../.././libsanitizer/libbacktrace/../../libbacktrace/fileline.c' line='183' column='1'/>
+      <parameter type-id='type-id-27' name='callback' filepath='../../.././libsanitizer/libbacktrace/../../libbacktrace/fileline.c' line='183' column='1'/>
       <!-- parameter of type 'typedef backtrace_error_callback' -->
       <parameter type-id='type-id-24' name='error_callback' filepath='../../.././libsanitizer/libbacktrace/../../libbacktrace/fileline.c' line='184' column='1'/>
       <!-- parameter of type 'void*' -->
@@ -4802,8 +4798,6 @@ 
       <!-- bool -->
       <return type-id='type-id-121'/>
     </function-type>
-    <!-- unsigned long int -->
-    <type-decl name='unsigned long int' size-in-bits='64' id='type-id-112'/>
   </abi-instr>
   <abi-instr address-size='64' path='../../.././libsanitizer/sanitizer_common/sanitizer_common_libcdep.cc' comp-dir-path='/tmp/legendre/spack-stage/spack-stage-ImG4Cf/gcc-4.9.2/x86_64-unknown-linux-gnu/libsanitizer/sanitizer_common' language='LANG_C_plus_plus'>
   </abi-instr>
@@ -5704,8 +5698,6 @@ 
       <!-- void -->
       <return type-id='type-id-25'/>
     </function-type>
-    <!-- unsigned short int -->
-    <type-decl name='unsigned short int' size-in-bits='16' id='type-id-178'/>
     <!-- bool (const char*) -->
     <function-type size-in-bits='64' id='type-id-190'>
       <!-- parameter of type 'const char*' -->
@@ -7568,15 +7560,15 @@ 
     <!-- typedef void (void*, const char*, int)* backtrace_error_callback -->
     <typedef-decl name='backtrace_error_callback' type-id='type-id-258' filepath='../../.././libsanitizer/../libbacktrace/backtrace.h' line='82' column='1' id='type-id-24'/>
     <!-- typedef int (void*, typedef uintptr_t, const char*, int, const char*)* backtrace_full_callback -->
-    <typedef-decl name='backtrace_full_callback' type-id='type-id-259' filepath='../../.././libsanitizer/../libbacktrace/backtrace.h' line='110' column='1' id='type-id-27'/>
+    <typedef-decl name='backtrace_full_callback' type-id='type-id-259' filepath='../../.././libsanitizer/../libbacktrace/backtrace.h' line='110' column='1' id='type-id-28'/>
     <!-- typedef void (void*, typedef uintptr_t, const char*, typedef uintptr_t, typedef uintptr_t)* backtrace_syminfo_callback -->
-    <typedef-decl name='backtrace_syminfo_callback' type-id='type-id-260' filepath='../../.././libsanitizer/../libbacktrace/backtrace.h' line='175' column='1' id='type-id-28'/>
+    <typedef-decl name='backtrace_syminfo_callback' type-id='type-id-260' filepath='../../.././libsanitizer/../libbacktrace/backtrace.h' line='175' column='1' id='type-id-27'/>
     <!-- typedef unsigned long int uintptr_t -->
     <typedef-decl name='uintptr_t' type-id='type-id-112' filepath='/usr/include/stdint.h' line='123' column='1' id='type-id-23'/>
     <!-- backtrace_state* -->
     <pointer-type-def type-id='type-id-7' size-in-bits='64' id='type-id-22'/>
     <!-- int (void*, typedef uintptr_t, const char*, int, const char*)* -->
-    <pointer-type-def type-id='type-id-30' size-in-bits='64' id='type-id-259'/>
+    <pointer-type-def type-id='type-id-29' size-in-bits='64' id='type-id-259'/>
     <!-- void (const char*, typedef size_t, void*)* -->
     <pointer-type-def type-id='type-id-83' size-in-bits='64' id='type-id-257'/>
     <!-- void (void*, const char*, int)* -->
@@ -10061,7 +10053,7 @@ 
     <!-- int (void*, void ()*)* -->
     <pointer-type-def type-id='type-id-1121' size-in-bits='64' id='type-id-783'/>
     <!-- int (void*, void*)* -->
-    <pointer-type-def type-id='type-id-29' size-in-bits='64' id='type-id-12'/>
+    <pointer-type-def type-id='type-id-30' size-in-bits='64' id='type-id-12'/>
     <!-- int (void*, void**)* -->
     <pointer-type-def type-id='type-id-1122' size-in-bits='64' id='type-id-754'/>
     <!-- int (void*, void**, SIZE_T*)* -->
diff --git a/tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi b/tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi
index c756cca7a542..18a4964be69c 100644
--- a/tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi
+++ b/tests/data/test-annotate/test19-pr19023-libtcmalloc_and_profiler.so.abi
@@ -2160,10 +2160,6 @@ 
         </member-function>
       </class-decl>
     </namespace-decl>
-    <!-- unsigned long int -->
-    <type-decl name='unsigned long int' size-in-bits='64' id='type-id-5'/>
-    <!-- unsigned short int -->
-    <type-decl name='unsigned short int' size-in-bits='16' id='type-id-22'/>
   </abi-instr>
   <abi-instr address-size='64' path='src/base/linuxthreads.cc' comp-dir-path='/tmp/legendre/spack-stage/spack-stage-kFgaKP/gperftools-2.4' language='LANG_C_plus_plus'>
     <!-- typedef int (void*, int, pid_t*, typedef __va_list_tag __va_list_tag*)* ListAllProcessThreadsCallBack -->
diff --git a/tests/data/test-annotate/test21-pr19092.so.abi b/tests/data/test-annotate/test21-pr19092.so.abi
index 5b17d83e7448..e009a191a42e 100644
--- a/tests/data/test-annotate/test21-pr19092.so.abi
+++ b/tests/data/test-annotate/test21-pr19092.so.abi
@@ -2537,11 +2537,6 @@ 
       <!-- int -->
       <return type-id='type-id-18'/>
     </function-type>
-    <!-- void () -->
-    <function-type size-in-bits='64' id='type-id-135'>
-      <!-- void -->
-      <return type-id='type-id-108'/>
-    </function-type>
     <!-- void (diagnostic_context*, const char*, va_list*) -->
     <function-type size-in-bits='64' id='type-id-137'>
       <!-- parameter of type 'diagnostic_context*' -->
@@ -2569,13 +2564,6 @@ 
       <!-- void -->
       <return type-id='type-id-108'/>
     </function-type>
-    <!-- void (void*) -->
-    <function-type size-in-bits='64' id='type-id-140'>
-      <!-- parameter of type 'void*' -->
-      <parameter type-id='type-id-14'/>
-      <!-- void -->
-      <return type-id='type-id-108'/>
-    </function-type>
     <!-- void (void*, _obstack_chunk*) -->
     <function-type size-in-bits='64' id='type-id-142'>
       <!-- parameter of type 'void*' -->
@@ -2594,6 +2582,18 @@ 
     </function-type>
     <!-- void -->
     <type-decl name='void' id='type-id-108'/>
+    <!-- void () -->
+    <function-type size-in-bits='64' id='type-id-135'>
+      <!-- void -->
+      <return type-id='type-id-108'/>
+    </function-type>
+    <!-- void (void*) -->
+    <function-type size-in-bits='64' id='type-id-140'>
+      <!-- parameter of type 'void*' -->
+      <parameter type-id='type-id-14'/>
+      <!-- void -->
+      <return type-id='type-id-108'/>
+    </function-type>
     <!-- void* (size_t) -->
     <function-type size-in-bits='64' id='type-id-148'>
       <!-- parameter of type 'typedef size_t' -->
@@ -10843,7 +10843,7 @@ 
     <!-- void (pex_obj*) -->
     <function-type size-in-bits='64' id='type-id-501'>
       <!-- parameter of type 'pex_obj*' -->
-      <parameter type-id='type-id-131'/>
+      <parameter type-id='type-id-131' name='obj'/>
       <!-- void -->
       <return type-id='type-id-108'/>
     </function-type>
diff --git a/tests/data/test-read-dwarf/PR25007-sdhci.ko.abi b/tests/data/test-read-dwarf/PR25007-sdhci.ko.abi
index b23715233e02..f3e2e259b803 100644
--- a/tests/data/test-read-dwarf/PR25007-sdhci.ko.abi
+++ b/tests/data/test-read-dwarf/PR25007-sdhci.ko.abi
@@ -10107,19 +10107,10 @@ 
       <parameter type-id='type-id-1183'/>
       <return type-id='type-id-165'/>
     </function-type>
-    <function-type size-in-bits='64' id='type-id-1112'>
-      <parameter type-id='type-id-614'/>
-      <parameter type-id='type-id-279'/>
-      <return type-id='type-id-165'/>
-    </function-type>
     <function-type size-in-bits='64' id='type-id-1114'>
       <parameter type-id='type-id-125'/>
       <return type-id='type-id-165'/>
     </function-type>
-    <function-type size-in-bits='64' id='type-id-1153'>
-      <parameter type-id='type-id-279'/>
-      <return type-id='type-id-282'/>
-    </function-type>
     <function-type size-in-bits='64' id='type-id-1184'>
       <parameter type-id='type-id-238'/>
       <parameter type-id='type-id-1138'/>
@@ -10147,10 +10138,6 @@ 
       <parameter type-id='type-id-51'/>
       <return type-id='type-id-1195'/>
     </function-type>
-    <function-type size-in-bits='64' id='type-id-1198'>
-      <parameter type-id='type-id-538'/>
-      <return type-id='type-id-530'/>
-    </function-type>
     <function-type size-in-bits='64' id='type-id-1199'>
       <parameter type-id='type-id-1357'/>
       <return type-id='type-id-635'/>
@@ -10177,9 +10164,6 @@ 
       <parameter type-id='type-id-241'/>
       <return type-id='type-id-51'/>
     </function-type>
-    <function-type size-in-bits='64' id='type-id-1220'>
-      <return type-id='type-id-53'/>
-    </function-type>
     <function-type size-in-bits='64' id='type-id-1221'>
       <parameter type-id='type-id-374'/>
       <parameter type-id='type-id-139'/>
@@ -10197,16 +10181,6 @@ 
       <parameter type-id='type-id-1553'/>
       <return type-id='type-id-53'/>
     </function-type>
-    <function-type size-in-bits='64' id='type-id-1224'>
-      <parameter type-id='type-id-24'/>
-      <parameter type-id='type-id-1143'/>
-      <return type-id='type-id-53'/>
-    </function-type>
-    <function-type size-in-bits='64' id='type-id-1225'>
-      <parameter type-id='type-id-165'/>
-      <parameter type-id='type-id-1143'/>
-      <return type-id='type-id-53'/>
-    </function-type>
     <function-type size-in-bits='64' id='type-id-1226'>
       <parameter type-id='type-id-1118'/>
       <return type-id='type-id-53'/>
@@ -10396,13 +10370,6 @@ 
       <parameter type-id='type-id-411'/>
       <return type-id='type-id-53'/>
     </function-type>
-    <function-type size-in-bits='64' id='type-id-1256'>
-      <parameter type-id='type-id-335'/>
-      <parameter type-id='type-id-279'/>
-      <parameter type-id='type-id-1093'/>
-      <parameter type-id='type-id-125'/>
-      <return type-id='type-id-53'/>
-    </function-type>
     <function-type size-in-bits='64' id='type-id-1257'>
       <parameter type-id='type-id-335'/>
       <parameter type-id='type-id-67'/>
@@ -10552,31 +10519,6 @@ 
       <parameter type-id='type-id-53'/>
       <return type-id='type-id-53'/>
     </function-type>
-    <function-type size-in-bits='64' id='type-id-1283'>
-      <parameter type-id='type-id-559'/>
-      <return type-id='type-id-53'/>
-    </function-type>
-    <function-type size-in-bits='64' id='type-id-1284'>
-      <parameter type-id='type-id-559'/>
-      <parameter type-id='type-id-165'/>
-      <parameter type-id='type-id-332'/>
-      <return type-id='type-id-53'/>
-    </function-type>
-    <function-type size-in-bits='64' id='type-id-1285'>
-      <parameter type-id='type-id-559'/>
-      <parameter type-id='type-id-559'/>
-      <parameter type-id='type-id-165'/>
-      <return type-id='type-id-53'/>
-    </function-type>
-    <function-type size-in-bits='64' id='type-id-1286'>
-      <parameter type-id='type-id-1343'/>
-      <return type-id='type-id-53'/>
-    </function-type>
-    <function-type size-in-bits='64' id='type-id-1287'>
-      <parameter type-id='type-id-1343'/>
-      <parameter type-id='type-id-125'/>
-      <return type-id='type-id-53'/>
-    </function-type>
     <function-type size-in-bits='64' id='type-id-1288'>
       <parameter type-id='type-id-225'/>
       <parameter type-id='type-id-1151'/>
@@ -10589,17 +10531,6 @@ 
       <parameter type-id='type-id-172'/>
       <return type-id='type-id-53'/>
     </function-type>
-    <function-type size-in-bits='64' id='type-id-1290'>
-      <parameter type-id='type-id-614'/>
-      <parameter type-id='type-id-279'/>
-      <return type-id='type-id-53'/>
-    </function-type>
-    <function-type size-in-bits='64' id='type-id-1292'>
-      <parameter type-id='type-id-614'/>
-      <parameter type-id='type-id-279'/>
-      <parameter type-id='type-id-1350'/>
-      <return type-id='type-id-53'/>
-    </function-type>
     <function-type size-in-bits='64' id='type-id-1294'>
       <parameter type-id='type-id-1357'/>
       <return type-id='type-id-53'/>
@@ -10660,10 +10591,6 @@ 
       <parameter type-id='type-id-100'/>
       <return type-id='type-id-53'/>
     </function-type>
-    <function-type size-in-bits='64' id='type-id-1305'>
-      <parameter type-id='type-id-274'/>
-      <return type-id='type-id-53'/>
-    </function-type>
     <function-type size-in-bits='64' id='type-id-1306'>
       <parameter type-id='type-id-826'/>
       <parameter type-id='type-id-114'/>
@@ -10704,22 +10631,6 @@ 
       <parameter type-id='type-id-238'/>
       <return type-id='type-id-53'/>
     </function-type>
-    <function-type size-in-bits='64' id='type-id-1314'>
-      <parameter type-id='type-id-577'/>
-      <parameter type-id='type-id-559'/>
-      <parameter type-id='type-id-557'/>
-      <return type-id='type-id-53'/>
-    </function-type>
-    <function-type size-in-bits='64' id='type-id-1315'>
-      <parameter type-id='type-id-577'/>
-      <parameter type-id='type-id-557'/>
-      <return type-id='type-id-53'/>
-    </function-type>
-    <function-type size-in-bits='64' id='type-id-1316'>
-      <parameter type-id='type-id-577'/>
-      <parameter type-id='type-id-127'/>
-      <return type-id='type-id-53'/>
-    </function-type>
     <function-type size-in-bits='64' id='type-id-1317'>
       <parameter type-id='type-id-241'/>
       <return type-id='type-id-53'/>
@@ -10835,10 +10746,6 @@ 
       <parameter type-id='type-id-114'/>
       <return type-id='type-id-67'/>
     </function-type>
-    <function-type size-in-bits='64' id='type-id-1363'>
-      <parameter type-id='type-id-1398'/>
-      <return type-id='type-id-67'/>
-    </function-type>
     <function-type size-in-bits='64' id='type-id-1364'>
       <parameter type-id='type-id-241'/>
       <parameter type-id='type-id-1409'/>
@@ -10863,14 +10770,6 @@ 
       <parameter type-id='type-id-1384'/>
       <return type-id='type-id-1085'/>
     </function-type>
-    <function-type size-in-bits='64' id='type-id-1427'>
-      <parameter type-id='type-id-1343'/>
-      <parameter type-id='type-id-1384'/>
-      <return type-id='type-id-1085'/>
-    </function-type>
-    <function-type size-in-bits='64' id='type-id-1428'>
-      <return type-id='type-id-172'/>
-    </function-type>
     <function-type size-in-bits='64' id='type-id-1429'>
       <parameter type-id='type-id-515'/>
       <return type-id='type-id-172'/>
@@ -10916,9 +10815,6 @@ 
       <parameter type-id='type-id-399'/>
       <return type-id='type-id-399'/>
     </function-type>
-    <function-type size-in-bits='64' id='type-id-1437'>
-      <return type-id='type-id-533'/>
-    </function-type>
     <function-type size-in-bits='64' id='type-id-1438'>
       <parameter type-id='type-id-335'/>
       <parameter type-id='type-id-333'/>
@@ -10963,15 +10859,6 @@ 
       <parameter type-id='type-id-1360'/>
       <return type-id='type-id-1027'/>
     </function-type>
-    <function-type size-in-bits='64' id='type-id-1445'>
-      <parameter type-id='type-id-335'/>
-      <parameter type-id='type-id-279'/>
-      <parameter type-id='type-id-1093'/>
-      <parameter type-id='type-id-24'/>
-      <parameter type-id='type-id-333'/>
-      <parameter type-id='type-id-176'/>
-      <return type-id='type-id-1027'/>
-    </function-type>
     <function-type size-in-bits='64' id='type-id-1446'>
       <parameter type-id='type-id-335'/>
       <parameter type-id='type-id-1360'/>
@@ -10998,44 +10885,11 @@ 
       <parameter type-id='type-id-113'/>
       <return type-id='type-id-1027'/>
     </function-type>
-    <function-type size-in-bits='64' id='type-id-1449'>
-      <parameter type-id='type-id-1343'/>
-      <parameter type-id='type-id-24'/>
-      <parameter type-id='type-id-176'/>
-      <parameter type-id='type-id-333'/>
-      <return type-id='type-id-1027'/>
-    </function-type>
     <function-type size-in-bits='64' id='type-id-1450'>
       <parameter type-id='type-id-1347'/>
       <parameter type-id='type-id-1339'/>
       <return type-id='type-id-1027'/>
     </function-type>
-    <function-type size-in-bits='64' id='type-id-1451'>
-      <parameter type-id='type-id-279'/>
-      <parameter type-id='type-id-1088'/>
-      <parameter type-id='type-id-24'/>
-      <return type-id='type-id-1027'/>
-    </function-type>
-    <function-type size-in-bits='64' id='type-id-1452'>
-      <parameter type-id='type-id-279'/>
-      <parameter type-id='type-id-1088'/>
-      <parameter type-id='type-id-165'/>
-      <parameter type-id='type-id-176'/>
-      <return type-id='type-id-1027'/>
-    </function-type>
-    <function-type size-in-bits='64' id='type-id-1453'>
-      <parameter type-id='type-id-790'/>
-      <parameter type-id='type-id-1369'/>
-      <parameter type-id='type-id-24'/>
-      <return type-id='type-id-1027'/>
-    </function-type>
-    <function-type size-in-bits='64' id='type-id-1454'>
-      <parameter type-id='type-id-790'/>
-      <parameter type-id='type-id-1369'/>
-      <parameter type-id='type-id-165'/>
-      <parameter type-id='type-id-176'/>
-      <return type-id='type-id-1027'/>
-    </function-type>
     <function-type size-in-bits='64' id='type-id-1455'>
       <parameter type-id='type-id-387'/>
       <parameter type-id='type-id-335'/>
@@ -11069,18 +10923,6 @@ 
       <parameter type-id='type-id-261'/>
       <return type-id='type-id-104'/>
     </function-type>
-    <function-type size-in-bits='64' id='type-id-1460'>
-      <parameter type-id='type-id-279'/>
-      <parameter type-id='type-id-1088'/>
-      <parameter type-id='type-id-53'/>
-      <return type-id='type-id-332'/>
-    </function-type>
-    <function-type size-in-bits='64' id='type-id-1461'>
-      <parameter type-id='type-id-279'/>
-      <parameter type-id='type-id-1093'/>
-      <parameter type-id='type-id-53'/>
-      <return type-id='type-id-332'/>
-    </function-type>
     <function-type size-in-bits='64' id='type-id-1462'>
       <parameter type-id='type-id-1476'/>
       <return type-id='type-id-718'/>
@@ -11094,14 +10936,6 @@ 
       <parameter type-id='type-id-1402'/>
       <return type-id='type-id-113'/>
     </function-type>
-    <function-type size-in-bits='64' id='type-id-1468'>
-      <parameter type-id='type-id-335'/>
-      <parameter type-id='type-id-114'/>
-      <parameter type-id='type-id-114'/>
-      <parameter type-id='type-id-114'/>
-      <parameter type-id='type-id-114'/>
-      <return type-id='type-id-114'/>
-    </function-type>
     <function-type size-in-bits='64' id='type-id-1469'>
       <parameter type-id='type-id-1410'/>
       <parameter type-id='type-id-1409'/>
@@ -11115,13 +10949,6 @@ 
       <parameter type-id='type-id-1379'/>
       <return type-id='type-id-841'/>
     </function-type>
-    <function-type size-in-bits='64' id='type-id-1073'>
-      <return type-id='type-id-1538'/>
-    </function-type>
-    <function-type size-in-bits='64' id='type-id-1477'>
-      <parameter type-id='type-id-899'/>
-      <return type-id='type-id-1538'/>
-    </function-type>
     <function-type size-in-bits='64' id='type-id-1478'>
       <parameter type-id='type-id-308'/>
       <return type-id='type-id-1538'/>
@@ -11248,26 +11075,12 @@ 
       <parameter type-id='type-id-53'/>
       <return type-id='type-id-1538'/>
     </function-type>
-    <function-type size-in-bits='64' id='type-id-1501'>
-      <parameter type-id='type-id-1343'/>
-      <return type-id='type-id-1538'/>
-    </function-type>
     <function-type size-in-bits='64' id='type-id-1502'>
       <parameter type-id='type-id-1347'/>
       <parameter type-id='type-id-67'/>
       <parameter type-id='type-id-67'/>
       <return type-id='type-id-1538'/>
     </function-type>
-    <function-type size-in-bits='64' id='type-id-1503'>
-      <parameter type-id='type-id-279'/>
-      <return type-id='type-id-1538'/>
-    </function-type>
-    <function-type size-in-bits='64' id='type-id-1504'>
-      <parameter type-id='type-id-279'/>
-      <parameter type-id='type-id-1356'/>
-      <parameter type-id='type-id-1346'/>
-      <return type-id='type-id-1538'/>
-    </function-type>
     <function-type size-in-bits='64' id='type-id-1505'>
       <parameter type-id='type-id-1357'/>
       <return type-id='type-id-1538'/>
@@ -11311,15 +11124,6 @@ 
       <parameter type-id='type-id-75'/>
       <return type-id='type-id-1538'/>
     </function-type>
-    <function-type size-in-bits='64' id='type-id-1514'>
-      <parameter type-id='type-id-274'/>
-      <return type-id='type-id-1538'/>
-    </function-type>
-    <function-type size-in-bits='64' id='type-id-1515'>
-      <parameter type-id='type-id-274'/>
-      <parameter type-id='type-id-165'/>
-      <return type-id='type-id-1538'/>
-    </function-type>
     <function-type size-in-bits='64' id='type-id-1516'>
       <parameter type-id='type-id-139'/>
       <return type-id='type-id-1538'/>
@@ -11388,19 +11192,10 @@ 
       <parameter type-id='type-id-335'/>
       <return type-id='type-id-1538'/>
     </function-type>
-    <function-type size-in-bits='64' id='type-id-1528'>
-      <parameter type-id='type-id-577'/>
-      <parameter type-id='type-id-127'/>
-      <return type-id='type-id-1538'/>
-    </function-type>
     <function-type size-in-bits='64' id='type-id-1529'>
       <parameter type-id='type-id-241'/>
       <return type-id='type-id-1538'/>
     </function-type>
-    <function-type size-in-bits='64' id='type-id-1530'>
-      <parameter type-id='type-id-1418'/>
-      <return type-id='type-id-1538'/>
-    </function-type>
     <function-type size-in-bits='64' id='type-id-1531'>
       <parameter type-id='type-id-399'/>
       <return type-id='type-id-1538'/>
@@ -11415,10 +11210,6 @@ 
       <parameter type-id='type-id-114'/>
       <return type-id='type-id-1538'/>
     </function-type>
-    <function-type size-in-bits='64' id='type-id-1534'>
-      <parameter type-id='type-id-127'/>
-      <return type-id='type-id-1538'/>
-    </function-type>
     <function-type size-in-bits='64' id='type-id-1535'>
       <parameter type-id='type-id-127'/>
       <parameter type-id='type-id-1204'/>
@@ -11433,9 +11224,6 @@ 
       <parameter type-id='type-id-1550'/>
       <return type-id='type-id-1538'/>
     </function-type>
-    <function-type size-in-bits='64' id='type-id-1539'>
-      <return type-id='type-id-127'/>
-    </function-type>
     <function-type size-in-bits='64' id='type-id-1540'>
       <parameter type-id='type-id-515'/>
       <parameter type-id='type-id-1123'/>
@@ -11453,6 +11241,223 @@ 
       <parameter type-id='type-id-114'/>
       <return type-id='type-id-127'/>
     </function-type>
+    <function-type size-in-bits='64' id='type-id-1547'>
+      <parameter type-id='type-id-127'/>
+      <return type-id='type-id-127'/>
+    </function-type>
+    <type-decl name='void' id='type-id-1538'/>
+    <function-type size-in-bits='64' id='type-id-1112'>
+      <parameter type-id='type-id-614'/>
+      <parameter type-id='type-id-279'/>
+      <return type-id='type-id-165'/>
+    </function-type>
+    <function-type size-in-bits='64' id='type-id-1153'>
+      <parameter type-id='type-id-279'/>
+      <return type-id='type-id-282'/>
+    </function-type>
+    <function-type size-in-bits='64' id='type-id-1198'>
+      <parameter type-id='type-id-538'/>
+      <return type-id='type-id-530'/>
+    </function-type>
+    <function-type size-in-bits='64' id='type-id-1220'>
+      <return type-id='type-id-53'/>
+    </function-type>
+    <function-type size-in-bits='64' id='type-id-1224'>
+      <parameter type-id='type-id-24'/>
+      <parameter type-id='type-id-1143'/>
+      <return type-id='type-id-53'/>
+    </function-type>
+    <function-type size-in-bits='64' id='type-id-1225'>
+      <parameter type-id='type-id-165'/>
+      <parameter type-id='type-id-1143'/>
+      <return type-id='type-id-53'/>
+    </function-type>
+    <function-type size-in-bits='64' id='type-id-1256'>
+      <parameter type-id='type-id-335'/>
+      <parameter type-id='type-id-279'/>
+      <parameter type-id='type-id-1093'/>
+      <parameter type-id='type-id-125'/>
+      <return type-id='type-id-53'/>
+    </function-type>
+    <function-type size-in-bits='64' id='type-id-1283'>
+      <parameter type-id='type-id-559'/>
+      <return type-id='type-id-53'/>
+    </function-type>
+    <function-type size-in-bits='64' id='type-id-1284'>
+      <parameter type-id='type-id-559'/>
+      <parameter type-id='type-id-165'/>
+      <parameter type-id='type-id-332'/>
+      <return type-id='type-id-53'/>
+    </function-type>
+    <function-type size-in-bits='64' id='type-id-1285'>
+      <parameter type-id='type-id-559'/>
+      <parameter type-id='type-id-559'/>
+      <parameter type-id='type-id-165'/>
+      <return type-id='type-id-53'/>
+    </function-type>
+    <function-type size-in-bits='64' id='type-id-1286'>
+      <parameter type-id='type-id-1343'/>
+      <return type-id='type-id-53'/>
+    </function-type>
+    <function-type size-in-bits='64' id='type-id-1287'>
+      <parameter type-id='type-id-1343'/>
+      <parameter type-id='type-id-125'/>
+      <return type-id='type-id-53'/>
+    </function-type>
+    <function-type size-in-bits='64' id='type-id-1290'>
+      <parameter type-id='type-id-614'/>
+      <parameter type-id='type-id-279'/>
+      <return type-id='type-id-53'/>
+    </function-type>
+    <function-type size-in-bits='64' id='type-id-1292'>
+      <parameter type-id='type-id-614'/>
+      <parameter type-id='type-id-279'/>
+      <parameter type-id='type-id-1350'/>
+      <return type-id='type-id-53'/>
+    </function-type>
+    <function-type size-in-bits='64' id='type-id-1305'>
+      <parameter type-id='type-id-274'/>
+      <return type-id='type-id-53'/>
+    </function-type>
+    <function-type size-in-bits='64' id='type-id-1314'>
+      <parameter type-id='type-id-577'/>
+      <parameter type-id='type-id-559'/>
+      <parameter type-id='type-id-557'/>
+      <return type-id='type-id-53'/>
+    </function-type>
+    <function-type size-in-bits='64' id='type-id-1315'>
+      <parameter type-id='type-id-577'/>
+      <parameter type-id='type-id-557'/>
+      <return type-id='type-id-53'/>
+    </function-type>
+    <function-type size-in-bits='64' id='type-id-1316'>
+      <parameter type-id='type-id-577'/>
+      <parameter type-id='type-id-127'/>
+      <return type-id='type-id-53'/>
+    </function-type>
+    <function-type size-in-bits='64' id='type-id-1363'>
+      <parameter type-id='type-id-1398'/>
+      <return type-id='type-id-67'/>
+    </function-type>
+    <function-type size-in-bits='64' id='type-id-1427'>
+      <parameter type-id='type-id-1343'/>
+      <parameter type-id='type-id-1384'/>
+      <return type-id='type-id-1085'/>
+    </function-type>
+    <function-type size-in-bits='64' id='type-id-1428'>
+      <return type-id='type-id-172'/>
+    </function-type>
+    <function-type size-in-bits='64' id='type-id-1437'>
+      <return type-id='type-id-533'/>
+    </function-type>
+    <function-type size-in-bits='64' id='type-id-1445'>
+      <parameter type-id='type-id-335'/>
+      <parameter type-id='type-id-279'/>
+      <parameter type-id='type-id-1093'/>
+      <parameter type-id='type-id-24'/>
+      <parameter type-id='type-id-333'/>
+      <parameter type-id='type-id-176'/>
+      <return type-id='type-id-1027'/>
+    </function-type>
+    <function-type size-in-bits='64' id='type-id-1449'>
+      <parameter type-id='type-id-1343'/>
+      <parameter type-id='type-id-24'/>
+      <parameter type-id='type-id-176'/>
+      <parameter type-id='type-id-333'/>
+      <return type-id='type-id-1027'/>
+    </function-type>
+    <function-type size-in-bits='64' id='type-id-1451'>
+      <parameter type-id='type-id-279'/>
+      <parameter type-id='type-id-1088'/>
+      <parameter type-id='type-id-24'/>
+      <return type-id='type-id-1027'/>
+    </function-type>
+    <function-type size-in-bits='64' id='type-id-1452'>
+      <parameter type-id='type-id-279'/>
+      <parameter type-id='type-id-1088'/>
+      <parameter type-id='type-id-165'/>
+      <parameter type-id='type-id-176'/>
+      <return type-id='type-id-1027'/>
+    </function-type>
+    <function-type size-in-bits='64' id='type-id-1453'>
+      <parameter type-id='type-id-790'/>
+      <parameter type-id='type-id-1369'/>
+      <parameter type-id='type-id-24'/>
+      <return type-id='type-id-1027'/>
+    </function-type>
+    <function-type size-in-bits='64' id='type-id-1454'>
+      <parameter type-id='type-id-790'/>
+      <parameter type-id='type-id-1369'/>
+      <parameter type-id='type-id-165'/>
+      <parameter type-id='type-id-176'/>
+      <return type-id='type-id-1027'/>
+    </function-type>
+    <function-type size-in-bits='64' id='type-id-1460'>
+      <parameter type-id='type-id-279'/>
+      <parameter type-id='type-id-1088'/>
+      <parameter type-id='type-id-53'/>
+      <return type-id='type-id-332'/>
+    </function-type>
+    <function-type size-in-bits='64' id='type-id-1461'>
+      <parameter type-id='type-id-279'/>
+      <parameter type-id='type-id-1093'/>
+      <parameter type-id='type-id-53'/>
+      <return type-id='type-id-332'/>
+    </function-type>
+    <function-type size-in-bits='64' id='type-id-1468'>
+      <parameter type-id='type-id-335'/>
+      <parameter type-id='type-id-114'/>
+      <parameter type-id='type-id-114'/>
+      <parameter type-id='type-id-114'/>
+      <parameter type-id='type-id-114'/>
+      <return type-id='type-id-114'/>
+    </function-type>
+    <function-type size-in-bits='64' id='type-id-1073'>
+      <return type-id='type-id-1538'/>
+    </function-type>
+    <function-type size-in-bits='64' id='type-id-1477'>
+      <parameter type-id='type-id-899'/>
+      <return type-id='type-id-1538'/>
+    </function-type>
+    <function-type size-in-bits='64' id='type-id-1501'>
+      <parameter type-id='type-id-1343'/>
+      <return type-id='type-id-1538'/>
+    </function-type>
+    <function-type size-in-bits='64' id='type-id-1503'>
+      <parameter type-id='type-id-279'/>
+      <return type-id='type-id-1538'/>
+    </function-type>
+    <function-type size-in-bits='64' id='type-id-1504'>
+      <parameter type-id='type-id-279'/>
+      <parameter type-id='type-id-1356'/>
+      <parameter type-id='type-id-1346'/>
+      <return type-id='type-id-1538'/>
+    </function-type>
+    <function-type size-in-bits='64' id='type-id-1514'>
+      <parameter type-id='type-id-274'/>
+      <return type-id='type-id-1538'/>
+    </function-type>
+    <function-type size-in-bits='64' id='type-id-1515'>
+      <parameter type-id='type-id-274'/>
+      <parameter type-id='type-id-165'/>
+      <return type-id='type-id-1538'/>
+    </function-type>
+    <function-type size-in-bits='64' id='type-id-1528'>
+      <parameter type-id='type-id-577'/>
+      <parameter type-id='type-id-127'/>
+      <return type-id='type-id-1538'/>
+    </function-type>
+    <function-type size-in-bits='64' id='type-id-1530'>
+      <parameter type-id='type-id-1418'/>
+      <return type-id='type-id-1538'/>
+    </function-type>
+    <function-type size-in-bits='64' id='type-id-1534'>
+      <parameter type-id='type-id-127'/>
+      <return type-id='type-id-1538'/>
+    </function-type>
+    <function-type size-in-bits='64' id='type-id-1539'>
+      <return type-id='type-id-127'/>
+    </function-type>
     <function-type size-in-bits='64' id='type-id-1543'>
       <parameter type-id='type-id-279'/>
       <return type-id='type-id-127'/>
@@ -11472,11 +11477,6 @@ 
       <parameter type-id='type-id-1412'/>
       <return type-id='type-id-127'/>
     </function-type>
-    <function-type size-in-bits='64' id='type-id-1547'>
-      <parameter type-id='type-id-127'/>
-      <return type-id='type-id-127'/>
-    </function-type>
-    <type-decl name='void' id='type-id-1538'/>
   </abi-instr>
   <abi-instr address-size='64' path='drivers/mmc/host/sdhci.mod.c' comp-dir-path='/ws/android/kernel/aosp/common-mainline/out/android-mainline/common' language='LANG_C89'>
     <class-decl name='anon_vma' is-struct='yes' visibility='default' is-declaration-only='yes' id='type-id-1086'/>
diff --git a/tests/data/test-read-dwarf/PR25042-libgdbm-clang-dwarf5.so.6.0.0.abi b/tests/data/test-read-dwarf/PR25042-libgdbm-clang-dwarf5.so.6.0.0.abi
index 0e6e8af45fc0..4a84fe97a226 100644
--- a/tests/data/test-read-dwarf/PR25042-libgdbm-clang-dwarf5.so.6.0.0.abi
+++ b/tests/data/test-read-dwarf/PR25042-libgdbm-clang-dwarf5.so.6.0.0.abi
@@ -476,11 +476,11 @@ 
       <parameter type-id='type-id-9' name='dbf' filepath='/tmp/ben/spack-stage/spack-stage-dQKT1q/spack-src/src/gdbmclose.c' line='30' column='1'/>
       <return type-id='type-id-8'/>
     </function-decl>
+    <type-decl name='void' id='type-id-11'/>
     <function-type size-in-bits='64' id='type-id-57'>
       <parameter type-id='type-id-56'/>
       <return type-id='type-id-11'/>
     </function-type>
-    <type-decl name='void' id='type-id-11'/>
   </abi-instr>
   <abi-instr address-size='64' path='gdbmcount.c' comp-dir-path='/tmp/ben/spack-stage/spack-stage-dQKT1q/spack-src/src' language='LANG_C99'>
     <type-decl name='long long unsigned int' size-in-bits='64' id='type-id-58'/>
diff --git a/tests/data/test-read-dwarf/test14-pr18893.so.abi b/tests/data/test-read-dwarf/test14-pr18893.so.abi
index cad90c1c61cc..4ed7a8cdcb42 100644
--- a/tests/data/test-read-dwarf/test14-pr18893.so.abi
+++ b/tests/data/test-read-dwarf/test14-pr18893.so.abi
@@ -604,7 +604,6 @@ 
       <parameter type-id='type-id-35'/>
       <return type-id='type-id-14'/>
     </function-type>
-    <type-decl name='unsigned long int' size-in-bits='64' id='type-id-3'/>
   </abi-instr>
   <abi-instr address-size='64' path='libnurbs/interface/glinterface.cc' comp-dir-path='/tmp/legendre/spack-stage/spack-stage-T0fsxk/Mesa-8.0.5/src/glu/sgi' language='LANG_C_plus_plus'>
     <class-decl name='GLUnurbs' size-in-bits='1149440' is-struct='yes' visibility='default' filepath='libnurbs/interface/glrenderer.h' line='49' column='1' id='type-id-39'>
diff --git a/tests/data/test-read-dwarf/test15-pr18892.so.abi b/tests/data/test-read-dwarf/test15-pr18892.so.abi
index a4f0b7fa2815..7f885838c344 100644
--- a/tests/data/test-read-dwarf/test15-pr18892.so.abi
+++ b/tests/data/test-read-dwarf/test15-pr18892.so.abi
@@ -1683,25 +1683,23 @@ 
       <parameter type-id='type-id-13'/>
       <return type-id='type-id-1'/>
     </function-decl>
-    <pointer-type-def type-id='type-id-7' size-in-bits='64' id='type-id-22'/>
-    <function-type size-in-bits='64' id='type-id-20'>
+    <function-type size-in-bits='64' id='type-id-21'>
       <parameter type-id='type-id-22'/>
       <parameter type-id='type-id-23'/>
       <parameter type-id='type-id-27'/>
       <parameter type-id='type-id-24'/>
       <parameter type-id='type-id-1'/>
-      <return type-id='type-id-8'/>
+      <return type-id='type-id-25'/>
     </function-type>
-    <function-type size-in-bits='64' id='type-id-21'>
+    <function-type size-in-bits='64' id='type-id-20'>
       <parameter type-id='type-id-22'/>
       <parameter type-id='type-id-23'/>
       <parameter type-id='type-id-28'/>
       <parameter type-id='type-id-24'/>
       <parameter type-id='type-id-1'/>
-      <return type-id='type-id-25'/>
+      <return type-id='type-id-8'/>
     </function-type>
-    <pointer-type-def type-id='type-id-29' size-in-bits='64' id='type-id-12'/>
-    <function-type size-in-bits='64' id='type-id-30'>
+    <function-type size-in-bits='64' id='type-id-29'>
       <parameter type-id='type-id-1'/>
       <parameter type-id='type-id-23'/>
       <parameter type-id='type-id-2'/>
@@ -1709,7 +1707,7 @@ 
       <parameter type-id='type-id-2'/>
       <return type-id='type-id-8'/>
     </function-type>
-    <function-type size-in-bits='64' id='type-id-29'>
+    <function-type size-in-bits='64' id='type-id-30'>
       <parameter type-id='type-id-1'/>
       <parameter type-id='type-id-1'/>
       <return type-id='type-id-8'/>
@@ -1746,7 +1744,7 @@ 
     <function-decl name='__asan_backtrace_pcinfo' mangled-name='__asan_backtrace_pcinfo' filepath='../../.././libsanitizer/libbacktrace/../../libbacktrace/fileline.c' line='166' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='__asan_backtrace_pcinfo'>
       <parameter type-id='type-id-22' name='state' filepath='../../.././libsanitizer/libbacktrace/../../libbacktrace/fileline.c' line='166' column='1'/>
       <parameter type-id='type-id-23' name='pc' filepath='../../.././libsanitizer/libbacktrace/../../libbacktrace/fileline.c' line='166' column='1'/>
-      <parameter type-id='type-id-27' name='callback' filepath='../../.././libsanitizer/libbacktrace/../../libbacktrace/fileline.c' line='167' column='1'/>
+      <parameter type-id='type-id-28' name='callback' filepath='../../.././libsanitizer/libbacktrace/../../libbacktrace/fileline.c' line='167' column='1'/>
       <parameter type-id='type-id-24' name='error_callback' filepath='../../.././libsanitizer/libbacktrace/../../libbacktrace/fileline.c' line='168' column='1'/>
       <parameter type-id='type-id-1' name='data' filepath='../../.././libsanitizer/libbacktrace/../../libbacktrace/fileline.c' line='168' column='1'/>
       <return type-id='type-id-8'/>
@@ -1754,7 +1752,7 @@ 
     <function-decl name='__asan_backtrace_syminfo' mangled-name='__asan_backtrace_syminfo' filepath='../../.././libsanitizer/libbacktrace/../../libbacktrace/fileline.c' line='182' column='1' visibility='default' binding='global' size-in-bits='64' elf-symbol-id='__asan_backtrace_syminfo'>
       <parameter type-id='type-id-22' name='state' filepath='../../.././libsanitizer/libbacktrace/../../libbacktrace/fileline.c' line='182' column='1'/>
       <parameter type-id='type-id-23' name='pc' filepath='../../.././libsanitizer/libbacktrace/../../libbacktrace/fileline.c' line='182' column='1'/>
-      <parameter type-id='type-id-28' name='callback' filepath='../../.././libsanitizer/libbacktrace/../../libbacktrace/fileline.c' line='183' column='1'/>
+      <parameter type-id='type-id-27' name='callback' filepath='../../.././libsanitizer/libbacktrace/../../libbacktrace/fileline.c' line='183' column='1'/>
       <parameter type-id='type-id-24' name='error_callback' filepath='../../.././libsanitizer/libbacktrace/../../libbacktrace/fileline.c' line='184' column='1'/>
       <parameter type-id='type-id-1' name='data' filepath='../../.././libsanitizer/libbacktrace/../../libbacktrace/fileline.c' line='184' column='1'/>
       <return type-id='type-id-8'/>
@@ -2653,7 +2651,6 @@ 
       <parameter type-id='type-id-8'/>
       <return type-id='type-id-121'/>
     </function-type>
-    <type-decl name='unsigned long int' size-in-bits='64' id='type-id-112'/>
   </abi-instr>
   <abi-instr address-size='64' path='../../.././libsanitizer/sanitizer_common/sanitizer_common_libcdep.cc' comp-dir-path='/tmp/legendre/spack-stage/spack-stage-ImG4Cf/gcc-4.9.2/x86_64-unknown-linux-gnu/libsanitizer/sanitizer_common' language='LANG_C_plus_plus'>
   </abi-instr>
@@ -3228,7 +3225,6 @@ 
       <parameter type-id='type-id-1'/>
       <return type-id='type-id-25'/>
     </function-type>
-    <type-decl name='unsigned short int' size-in-bits='16' id='type-id-178'/>
     <function-type size-in-bits='64' id='type-id-190'>
       <parameter type-id='type-id-2'/>
       <return type-id='type-id-121'/>
@@ -4268,11 +4264,11 @@ 
   <abi-instr address-size='64' path='../../.././libsanitizer/sanitizer_common/sanitizer_symbolizer_libbacktrace.cc' comp-dir-path='/tmp/legendre/spack-stage/spack-stage-ImG4Cf/gcc-4.9.2/x86_64-unknown-linux-gnu/libsanitizer/sanitizer_common' language='LANG_C_plus_plus'>
     <typedef-decl name='demangle_callbackref' type-id='type-id-257' filepath='../../.././libsanitizer/../include/demangle.h' line='150' column='1' id='type-id-81'/>
     <typedef-decl name='backtrace_error_callback' type-id='type-id-258' filepath='../../.././libsanitizer/../libbacktrace/backtrace.h' line='82' column='1' id='type-id-24'/>
-    <typedef-decl name='backtrace_full_callback' type-id='type-id-259' filepath='../../.././libsanitizer/../libbacktrace/backtrace.h' line='110' column='1' id='type-id-27'/>
-    <typedef-decl name='backtrace_syminfo_callback' type-id='type-id-260' filepath='../../.././libsanitizer/../libbacktrace/backtrace.h' line='175' column='1' id='type-id-28'/>
+    <typedef-decl name='backtrace_full_callback' type-id='type-id-259' filepath='../../.././libsanitizer/../libbacktrace/backtrace.h' line='110' column='1' id='type-id-28'/>
+    <typedef-decl name='backtrace_syminfo_callback' type-id='type-id-260' filepath='../../.././libsanitizer/../libbacktrace/backtrace.h' line='175' column='1' id='type-id-27'/>
     <typedef-decl name='uintptr_t' type-id='type-id-112' filepath='/usr/include/stdint.h' line='123' column='1' id='type-id-23'/>
     <pointer-type-def type-id='type-id-7' size-in-bits='64' id='type-id-22'/>
-    <pointer-type-def type-id='type-id-30' size-in-bits='64' id='type-id-259'/>
+    <pointer-type-def type-id='type-id-29' size-in-bits='64' id='type-id-259'/>
     <pointer-type-def type-id='type-id-83' size-in-bits='64' id='type-id-257'/>
     <pointer-type-def type-id='type-id-31' size-in-bits='64' id='type-id-258'/>
     <pointer-type-def type-id='type-id-32' size-in-bits='64' id='type-id-260'/>
@@ -5729,7 +5725,7 @@ 
     <pointer-type-def type-id='type-id-1119' size-in-bits='64' id='type-id-878'/>
     <pointer-type-def type-id='type-id-1120' size-in-bits='64' id='type-id-745'/>
     <pointer-type-def type-id='type-id-1121' size-in-bits='64' id='type-id-783'/>
-    <pointer-type-def type-id='type-id-29' size-in-bits='64' id='type-id-12'/>
+    <pointer-type-def type-id='type-id-30' size-in-bits='64' id='type-id-12'/>
     <pointer-type-def type-id='type-id-1122' size-in-bits='64' id='type-id-754'/>
     <pointer-type-def type-id='type-id-1123' size-in-bits='64' id='type-id-609'/>
     <pointer-type-def type-id='type-id-1124' size-in-bits='64' id='type-id-724'/>
diff --git a/tests/data/test-read-dwarf/test16-pr18904.so.abi b/tests/data/test-read-dwarf/test16-pr18904.so.abi
index ed1f9b07403b..b4dd1ee75cc8 100644
--- a/tests/data/test-read-dwarf/test16-pr18904.so.abi
+++ b/tests/data/test-read-dwarf/test16-pr18904.so.abi
@@ -2160,8 +2160,6 @@ 
       <parameter type-id='type-id-150'/>
       <return type-id='type-id-154'/>
     </function-type>
-    <type-decl name='unsigned long int' size-in-bits='64' id='type-id-6'/>
-    <type-decl name='unsigned short int' size-in-bits='16' id='type-id-57'/>
   </abi-instr>
   <abi-instr address-size='64' path='../../../gcc/liboffloadmic/runtime/compiler_if_host.cpp' comp-dir-path='/export/users/iverbin/gcc_build_host/x86_64-pc-linux-gnu/liboffloadmic' language='LANG_C_plus_plus'>
     <array-type-def dimensions='1' type-id='type-id-155' size-in-bits='128' id='type-id-156'>
diff --git a/tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi b/tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi
index 6def22d56114..da5bb27f4c51 100644
--- a/tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi
+++ b/tests/data/test-read-dwarf/test19-pr19023-libtcmalloc_and_profiler.so.abi
@@ -1185,8 +1185,6 @@ 
         </member-function>
       </class-decl>
     </namespace-decl>
-    <type-decl name='unsigned long int' size-in-bits='64' id='type-id-5'/>
-    <type-decl name='unsigned short int' size-in-bits='16' id='type-id-22'/>
   </abi-instr>
   <abi-instr address-size='64' path='src/base/linuxthreads.cc' comp-dir-path='/tmp/legendre/spack-stage/spack-stage-kFgaKP/gperftools-2.4' language='LANG_C_plus_plus'>
     <typedef-decl name='ListAllProcessThreadsCallBack' type-id='type-id-58' filepath='./src/base/thread_lister.h' line='48' column='1' id='type-id-59'/>
diff --git a/tests/data/test-read-dwarf/test21-pr19092.so.abi b/tests/data/test-read-dwarf/test21-pr19092.so.abi
index c32385188030..c10916fa7484 100644
--- a/tests/data/test-read-dwarf/test21-pr19092.so.abi
+++ b/tests/data/test-read-dwarf/test21-pr19092.so.abi
@@ -1516,9 +1516,6 @@ 
       <parameter type-id='type-id-14'/>
       <return type-id='type-id-18'/>
     </function-type>
-    <function-type size-in-bits='64' id='type-id-135'>
-      <return type-id='type-id-108'/>
-    </function-type>
     <function-type size-in-bits='64' id='type-id-137'>
       <parameter type-id='type-id-127'/>
       <parameter type-id='type-id-15'/>
@@ -1534,10 +1531,6 @@ 
       <parameter type-id='type-id-18'/>
       <return type-id='type-id-108'/>
     </function-type>
-    <function-type size-in-bits='64' id='type-id-140'>
-      <parameter type-id='type-id-14'/>
-      <return type-id='type-id-108'/>
-    </function-type>
     <function-type size-in-bits='64' id='type-id-142'>
       <parameter type-id='type-id-14'/>
       <parameter type-id='type-id-33'/>
@@ -1548,6 +1541,13 @@ 
       <return type-id='type-id-14'/>
     </function-type>
     <type-decl name='void' id='type-id-108'/>
+    <function-type size-in-bits='64' id='type-id-135'>
+      <return type-id='type-id-108'/>
+    </function-type>
+    <function-type size-in-bits='64' id='type-id-140'>
+      <parameter type-id='type-id-14'/>
+      <return type-id='type-id-108'/>
+    </function-type>
     <function-type size-in-bits='64' id='type-id-148'>
       <parameter type-id='type-id-94'/>
       <return type-id='type-id-14'/>
@@ -7000,7 +7000,7 @@ 
       <return type-id='type-id-493'/>
     </function-type>
     <function-type size-in-bits='64' id='type-id-501'>
-      <parameter type-id='type-id-131'/>
+      <parameter type-id='type-id-131' name='obj'/>
       <return type-id='type-id-108'/>
     </function-type>
   </abi-instr>
diff --git a/tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi b/tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi
index 288abf42f36a..46952f55eeb9 100644
--- a/tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi
+++ b/tests/data/test-read-dwarf/test22-pr19097-libstdc++.so.6.0.17.so.abi
@@ -4356,7 +4356,6 @@ 
       <parameter type-id='type-id-56'/>
       <return type-id='type-id-5'/>
     </function-type>
-    <type-decl name='unsigned long int' size-in-bits='64' id='type-id-44'/>
     <function-type size-in-bits='64' id='type-id-95'>
       <parameter type-id='type-id-91'/>
       <return type-id='type-id-34'/>