IR: clean up look_through_decl_only* functions

These functions handle both bare and smart pointers. The _class and
_enum functions delegate to suffixless functions.

Some of these functions were not used. This commit drops them.

One function - used to implement the others - was not exported and had
subtly different semantics. This commits inlines the defining function
into one its callers and changes the other caller to call the latter
function.

Overall there is still a single function containing the core
definition, but with simpler logic.

No performance impact could be discerned.

	* include/abg-fwd.h (look_through_decl_only_class): Drop
	class_or_union reference overload declaration.
	(look_through_decl_only_enum): Drop const enum_type_decl
	reference overload declaration.
	(look_through_decl_only): Drop const decl_base reference
	overload declaration. Change decl_base_sptr overload to take
	the smart pointer by value instead of const reference.
	* src/abg-ir.cc (look_through_decl_only_class): Drop
	class_or_union reference overload definition.
	(look_through_decl_only_enum): Drop const enum_type_decl
	reference overload definition.
	(look_through_decl_only): Drop const decl_base reference
	overload definition. Change decl_base pointer overload to call
	the decl_base_sptr overload. Change the decl_base_sptr
	overload to take the smart pointer by value instead of const
	reference and contain a simplified while loop from the old
	decl_base reference overload definition.

Change-Id: I2fe1a5f1510b9fa19f09d8cf0312b2ae47ce3762
Signed-off-by: Giuliano Procida <gprocida@google.com>
2 files changed