Add function to strip pointer type and get down to the actual pointee type.
Add a function to traverse down the pointer layers to the pointee type. gcc/ChangeLog: * tree.h (strip_pointer_types): New.
This commit is contained in:
parent
001fb23ae4
commit
7058b2d0c9
1 changed files with 11 additions and 0 deletions
11
gcc/tree.h
11
gcc/tree.h
|
@ -5053,6 +5053,17 @@ strip_array_types (tree type)
|
|||
return type;
|
||||
}
|
||||
|
||||
/* Recursively traverse down pointer type layers to pointee type. */
|
||||
|
||||
inline const_tree
|
||||
strip_pointer_types (const_tree type)
|
||||
{
|
||||
while (POINTER_TYPE_P (type))
|
||||
type = TREE_TYPE (type);
|
||||
|
||||
return type;
|
||||
}
|
||||
|
||||
/* Desription of the reason why the argument of valid_constant_size_p
|
||||
is not a valid size. */
|
||||
enum cst_size_error {
|
||||
|
|
Loading…
Add table
Reference in a new issue