diff options
author | Giuliano Belinassi <giuliano.belinassi@usp.br> | 2020-08-22 17:43:43 -0300 |
---|---|---|
committer | Giuliano Belinassi <giuliano.belinassi@usp.br> | 2020-08-22 17:43:43 -0300 |
commit | a926878ddbd5a98b272c22171ce58663fc04c3e0 (patch) | |
tree | 86af256e5d9a9c06263c00adc90e5fe348008c43 /gcc/builtins.h | |
parent | 542730f087133690b47e036dfd43eb0db8a650ce (diff) | |
parent | 07cbaed8ba7d1b6e4ab3a9f44175502a4e1ecdb1 (diff) | |
download | gcc-devel/autopar_devel.zip gcc-devel/autopar_devel.tar.gz gcc-devel/autopar_devel.tar.bz2 |
Merge branch 'autopar_rebase2' into autopar_develdevel/autopar_devel
Quickly commit changes in the rebase branch.
Diffstat (limited to 'gcc/builtins.h')
-rw-r--r-- | gcc/builtins.h | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/gcc/builtins.h b/gcc/builtins.h index 7d8b9cd..8b812ce 100644 --- a/gcc/builtins.h +++ b/gcc/builtins.h @@ -152,11 +152,39 @@ extern bool target_char_cst_p (tree t, char *p); extern internal_fn associated_internal_fn (tree); extern internal_fn replacement_internal_fn (gcall *); -bool check_nul_terminated_array (tree, tree, tree = NULL_TREE); +extern bool check_nul_terminated_array (tree, tree, tree = NULL_TREE); extern void warn_string_no_nul (location_t, const char *, tree, tree); extern tree unterminated_array (tree, tree * = NULL, bool * = NULL); extern bool builtin_with_linkage_p (tree); -extern bool check_access (tree, tree, tree, tree, tree, tree, tree); +/* Describes a reference to an object used in an access. */ +struct access_ref +{ + access_ref (): ref () + { + /* Set to valid. */ + offrng[0] = offrng[1] = 0; + /* Invalidate. */ + sizrng[0] = sizrng[1] = -1; + } + + /* Reference to the object. */ + tree ref; + + /* Range of offsets into and sizes of the object(s). */ + offset_int offrng[2]; + offset_int sizrng[2]; +}; + +/* Describes a pair of references used in an access by built-in + functions like memcpy. */ +struct access_data +{ + /* Destination and source of the access. */ + access_ref dst, src; +}; + +extern bool check_access (tree, tree, tree, tree, tree, tree, tree, + bool = true, const access_data * = NULL); #endif /* GCC_BUILTINS_H */ |