summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2016-07-19 23:33:21 -0400
committerJason Merrill <jason@redhat.com>2016-07-19 23:46:12 -0400
commita23f90493ebe3378ede644d1500146614dcc62e9 (patch)
tree19b97513878980f5042e6719cb0516d8516c6b2d
parent7c7830cfc5b3c7be329e121fba726784f2511167 (diff)
downloadgcc-jason/concepts-rewrite.tar.gz
Shortcut get_constraints when !flag_concepts.jason/concepts-rewrite
-rw-r--r--gcc/cp/pt.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index a3b5b0a2f0c..4e9c386d8fb 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -24482,6 +24482,9 @@ static GTY (()) hash_table<constr_hasher> *decl_constraints;
tree
get_constraints (tree t)
{
+ if (!flag_concepts)
+ return NULL_TREE;
+
gcc_assert (DECL_P (t));
if (TREE_CODE (t) == TEMPLATE_DECL)
t = DECL_TEMPLATE_RESULT (t);
@@ -24503,7 +24506,7 @@ set_constraints (tree t, tree ci)
{
if (!ci)
return;
- gcc_assert (t);
+ gcc_assert (t && flag_concepts);
if (TREE_CODE (t) == TEMPLATE_DECL)
t = DECL_TEMPLATE_RESULT (t);
gcc_assert (!get_constraints (t));