GCC Middle and Back End API Reference
tree-object-size.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  { OST_SUBOBJECT = 1 , OST_MINIMUM = 2 , OST_DYNAMIC = 4 , OST_END = 8 }
 

Functions

void init_object_sizes (void)
 
void fini_object_sizes (void)
 
bool compute_builtin_object_size (tree, int, tree *)
 
tree decl_init_size (tree, bool)
 

Enumeration Type Documentation

◆ anonymous enum

Declarations for tree-object-size.cc.
   Copyright (C) 2013-2024 Free Software Foundation, Inc.

This file is part of GCC.

GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3, or (at your option)
any later version.

GCC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3.  If not see
<http://www.gnu.org/licenses/>.   
Bits in object_size_type.   
Enumerator
OST_SUBOBJECT 
OST_MINIMUM 
OST_DYNAMIC 
OST_END 

Function Documentation

◆ compute_builtin_object_size()

◆ decl_init_size()

tree decl_init_size ( tree decl,
bool min )
extern
Returns the size of the object designated by DECL considering its
initializer if it either has one or if it would not affect its size,
otherwise the size of the object without the initializer when MIN
is true, else null.  An object's initializer affects the object's
size if it's a struct type with a flexible array member.   

References build3(), byte_position(), component_ref_size(), DECL_SIZE_UNIT, fold_build2, ggc_alloc(), last, last_field(), NULL_TREE, TREE_CODE, TREE_TYPE, TYPE_SIZE, and TYPE_SIZE_UNIT.

Referenced by addr_object_size(), and handle_decl().

◆ fini_object_sizes()

void fini_object_sizes ( void )
extern
Destroy data structures after the object size computation.   

References BITMAP_FREE, computed, object_size_info::object_size_type, object_sizes_release(), and OST_END.

Referenced by object_sizes_execute().

◆ init_object_sizes()

void init_object_sizes ( void )
extern
Initialize data structures for the object size computation.   

References BITMAP_ALLOC, computed, init_offset_limit(), NULL, object_size_info::object_size_type, object_sizes_grow(), and OST_END.

Referenced by object_sizes_execute().