From 6e7cc1c9886510596c133d7aa3a8ae02e9d50e6d Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Tue, 14 Apr 2020 09:28:58 -0400 Subject: [PATCH 029/179] FIXME: eliminate copy of make_region_for_type --- gcc/analyzer/region-model2.cc | 49 ----------------------------------- 1 file changed, 49 deletions(-) diff --git a/gcc/analyzer/region-model2.cc b/gcc/analyzer/region-model2.cc index 0d68fd920db..9c71831a06b 100644 --- a/gcc/analyzer/region-model2.cc +++ b/gcc/analyzer/region-model2.cc @@ -65,12 +65,6 @@ along with GCC; see the file COPYING3. If not see namespace ana { -#if 0 -static region2 * -make_region_for_type (region2 *parent_reg, tree type, - region_model2_context *ctxt); -#endif - /* Dump T to PP in language-independent form, for debugging/logging/dumping purposes. */ @@ -5683,49 +5677,6 @@ region_model2::replace_svalue2 (svalue2 *sval, svalue2 *new_sval) } #endif -/* Make a region2 of an appropriate subclass for TYPE, - with parent PARENT_REG, or return NULL for types we don't yet know - how to handle. */ -#if 0 -static region2 * -make_region_for_type (region2 *parent_reg, tree type, - region_model2_context *ctxt) -{ - gcc_assert (TYPE_P (type)); - - if (INTEGRAL_TYPE_P (type) - || SCALAR_FLOAT_TYPE_P (type) - || POINTER_TYPE_P (type) - || TREE_CODE (type) == COMPLEX_TYPE - || TREE_CODE (type) == VECTOR_TYPE) - return new primitive_region2 (parent_reg, type); - - if (TREE_CODE (type) == RECORD_TYPE) - return new struct_region2 (parent_reg, type); - - if (TREE_CODE (type) == ARRAY_TYPE) - return new array_region2 (parent_reg, type); - - if (TREE_CODE (type) == UNION_TYPE) - return new union_region2 (parent_reg, type); - - if (FUNC_OR_METHOD_TYPE_P (type)) - return new function_region2 (parent_reg, type); - - /* If we have a void *, make a new symbolic region2. */ - if (VOID_TYPE_P (type)) - return new symbolic_region2 (parent_reg, type, false); - - /* If we can't handle TYPE, return a placeholder region2, and stop - exploring this path. */ - gcc_unreachable (); -#if 0 - return make_region2_for_unexpected_tree_code (ctxt, type, - dump_location_t ()); -#endif -} -#endif - /* Helper class for region_model2::purge_unused_svalue2s. */ #if 0 -- 2.21.0