summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/abg-writer.cc13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/abg-writer.cc b/src/abg-writer.cc
index 496f36a6..7802128d 100644
--- a/src/abg-writer.cc
+++ b/src/abg-writer.cc
@@ -2321,18 +2321,21 @@ write_referenced_types(write_context & ctxt,
2321 { 2321 {
2322 // We handle types which have declarations *and* function 2322 // We handle types which have declarations *and* function
2323 // types here. 2323 // types here.
2324 type_base_sptr t(*i, noop_deleter()); 2324 type_base* t = *i;
2325 if (!ctxt.type_is_emitted(t)) 2325 if (!ctxt.type_is_emitted(t))
2326 { 2326 {
2327 if (decl_base* d = get_type_declaration(*i)) 2327 if (decl_base* d = get_type_declaration(t))
2328 { 2328 {
2329 decl_base_sptr decl(d, noop_deleter()); 2329 decl_base_sptr decl(d, noop_deleter());
2330 write_decl_in_scope(decl, ctxt, 2330 write_decl_in_scope(decl, ctxt,
2331 indent + c.get_xml_element_indent()); 2331 indent + c.get_xml_element_indent());
2332 } 2332 }
2333 else if (function_type_sptr fn_type = is_function_type(t)) 2333 else if (function_type* f = is_function_type(t))
2334 write_function_type(fn_type, ctxt, 2334 {
2335 indent + c.get_xml_element_indent()); 2335 function_type_sptr fn_type(f, noop_deleter());
2336 write_function_type(fn_type, ctxt,
2337 indent + c.get_xml_element_indent());
2338 }
2336 else 2339 else
2337 ABG_ASSERT_NOT_REACHED; 2340 ABG_ASSERT_NOT_REACHED;
2338 } 2341 }