aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1993-10-03 21:45:49 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1993-10-03 21:45:49 -0400
commit7380d7072744087f40c014b95d13e3df770de084 (patch)
tree551ab10543a1d931fe31b331f85cff90fa8975a7
parentab487f123ade7120fbe5304b91e45091c3bc0d96 (diff)
downloadgcc-7380d7072744087f40c014b95d13e3df770de084.zip
gcc-7380d7072744087f40c014b95d13e3df770de084.tar.gz
gcc-7380d7072744087f40c014b95d13e3df770de084.tar.bz2
Add declarations for contains_placeholder_p, substitute_in_{expr,type}.
From-SVN: r5580
-rw-r--r--gcc/tree.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/tree.h b/gcc/tree.h
index e522dcd..2ece577 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -1220,6 +1220,27 @@ extern int lvalue_or_else PROTO((tree, char *));
extern tree save_expr PROTO((tree));
+/* Return 1 if EXP contains a PLACEHOLDER_EXPR; i.e., if it represents a size
+ or offset that depends on a field within a record.
+
+ Note that we only allow such expressions within simple arithmetic
+ or a COND_EXPR. */
+
+extern int contains_placeholder_p PROTO((tree));
+
+/* Given a tree EXP, a FIELD_DECL F, and a replacement value R,
+ return a tree with all occurrences of references to F in a
+ PLACEHOLDER_EXPR replaced by R. Note that we assume here that EXP
+ contains only arithmetic expressions. */
+
+extern tree substitute_in_expr PROTO((tree, tree, tree));
+
+/* Given a type T, a FIELD_DECL F, and a replacement value R,
+ return a new type with all size expressions that contain F
+ updated by replacing the reference to F with R. */
+
+extern tree substitute_in_type PROTO((tree, tree, tree));
+
/* variable_size (EXP) is like save_expr (EXP) except that it
is for the special case of something that is part of a
variable size for a data type. It makes special arrangements