diff --git a/src/util/README.md b/src/util/README.md index 4da10511149..76f39cd1015 100644 --- a/src/util/README.md +++ b/src/util/README.md @@ -195,7 +195,7 @@ table, looking up the target symbol name in each successive table until one is found. Note class \ref multi_namespacet can layer arbitrary numbers of symbol tables, while for historical reasons \ref namespacet can layer up to two. -The namespace wrapper class also provides the \ref namespacet::follow +The namespace wrapper class also provides the \ref namespacet::follow_tag operation, which dereferences a `tag_typet` to retrieve the type it refers to, including following a type tag which refers to another symbol which eventually refers to a 'real' type. diff --git a/src/util/namespace.cpp b/src/util/namespace.cpp index d758bb73b83..da963951e7c 100644 --- a/src/util/namespace.cpp +++ b/src/util/namespace.cpp @@ -43,20 +43,6 @@ const symbolt &namespace_baset::lookup(const tag_typet &type) const return lookup(type.get_identifier()); } -/// Resolve type symbol to the type it points to. -/// \param src: The type we want to resolve in the symbol table. -/// \return The resolved type. -const typet &namespace_baset::follow(const typet &src) const -{ - if(src.id() == ID_union_tag) - return follow_tag(to_union_tag_type(src)); - - if(src.id() == ID_struct_tag) - return follow_tag(to_struct_tag_type(src)); - - return src; -} - /// Follow type tag of union type. /// \param src: The union tag type to dispatch on. /// \return The type of the union tag in the symbol table. diff --git a/src/util/namespace.h b/src/util/namespace.h index 090c7625161..1594fea198d 100644 --- a/src/util/namespace.h +++ b/src/util/namespace.h @@ -10,7 +10,6 @@ Author: Daniel Kroening, kroening@kroening.com #ifndef CPROVER_UTIL_NAMESPACE_H #define CPROVER_UTIL_NAMESPACE_H -#include "deprecate.h" #include "invariant.h" #include "irep.h" @@ -61,8 +60,6 @@ class namespace_baset virtual ~namespace_baset(); void follow_macros(exprt &) const; - DEPRECATED(SINCE(2024, 2, 19, "use follow_tag(...) instead")) - const typet &follow(const typet &) const; const union_typet &follow_tag(const union_tag_typet &) const; const struct_typet &follow_tag(const struct_tag_typet &) const;