summaryrefslogtreecommitdiff
path: root/gcc/ipa-type-escape-analysis.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ipa-type-escape-analysis.h')
-rw-r--r--gcc/ipa-type-escape-analysis.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/ipa-type-escape-analysis.h b/gcc/ipa-type-escape-analysis.h
index 6f40bd5d5e1..17a0a51d817 100644
--- a/gcc/ipa-type-escape-analysis.h
+++ b/gcc/ipa-type-escape-analysis.h
@@ -97,6 +97,16 @@ assert_is_gimple_rhs_class (const gimple *stmt,
gcc_assert (succeeds);
}
+/* There are some cases where I need to change a const_tree to a tree.
+ * Some of these are part of the way the API is written. To avoid
+ * warnings, always use this function for casting away const-ness.
+ */
+inline static tree
+const_tree_to_tree (const_tree t)
+{
+ return (tree) t;
+}
+
// TODO: Rename?
// TSET_T stands for type set.
typedef std::set<const_tree> tset_t;