[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Support for function pointers and references


> I've followed your renames, but I've made the condition
> if (!ctxt.fntype_is_referenced(*i) || ctxt.type_is_emitted(*i))
> ...and amended the comment accordingly...as otherwise it would let
> unreferenced fntypes slip through.

And you are right.  My bad.

> I also created a ctxt.clear_referenced_fntypes_map, since it needs to be cleared
> along with the emitted_types_map, otherwise we'd get duplicates across
> TUs.

Great, thanks.

> The changes are in the usual place :)

Thanks, I have looked at them and I just have one remaining nit comment:

diff --git a/src/abg-writer.cc b/src/abg-writer.cc

+  /// Record a given function type as being scheduled for emitting
+  /// to the XML output.
+  ///
+  /// @param f a shared pointer to a function type
+  void
+  record_fntype_as_referenced(const function_type_sptr& f)

This comment should be amended to say that the function records a
function type as being referenced by another type that has been
emitted (e.g, a pointer or reference type which pointed-to type is the
function type passed in argument).

+  /// Test if a given function type has been written out to the
+  /// XML output.
+  ///
+  /// @param f a shared pointer to a function type
+  ///
+  /// @return true if the type has already been emitted, false
+  /// otherwise.
+  bool
+  fntype_is_referenced(const function_type_sptr& f)


The patch is OK to commit with the changes above.  Again, you can commit
it to master or I can do it, as you prefer.

Thank you very much for your dedication and your patience on this topic.
The patch-set is in, and I like it very much.  This is a great new
capability for libabigail!  Woot!