diff options
Diffstat (limited to 'gcc/cp/cp-gimplify.c')
-rw-r--r-- | gcc/cp/cp-gimplify.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/cp/cp-gimplify.c b/gcc/cp/cp-gimplify.c index d27e39c..9d848ea 100644 --- a/gcc/cp/cp-gimplify.c +++ b/gcc/cp/cp-gimplify.c @@ -2171,6 +2171,20 @@ cp_fully_fold (tree x) return cp_fold_rvalue (x); } +/* Likewise, but also fold recursively, which cp_fully_fold doesn't perform + in some cases. */ + +tree +cp_fully_fold_init (tree x) +{ + if (processing_template_decl) + return x; + x = cp_fully_fold (x); + hash_set<tree> pset; + cp_walk_tree (&x, cp_fold_r, &pset, NULL); + return x; +} + /* c-common interface to cp_fold. If IN_INIT, this is in a static initializer and certain changes are made to the folding done. Or should be (FIXME). We never touch maybe_const, as it is only used for the C front-end |